Problem solved. I need to set Environment variable in windows, not inside R.
1. Click through: start >> control panel >> system
2. Click the Advanced tab.
3. Click Environment variables.
4. Click New (under 'system') to add a new variable name and value.
----- Original Message ----
From: array chip <arrayprofile at yahoo.com>
To: r-help at r-project.org
Sent: Tue, August 3, 2010 4:41:50 PM
Subject: [R] xlsx package
HI, I was trying to install xlsx package for reading in Excel 2007 files. The
installation went smoothly. But when I tried to load the library, I got the
following error message:
> library(xlsx)
Loading required package: xlsxjars
Loading required package: rJava
Error : .onLoad failed in loadNamespace() for 'xlsxjars', details:
call: .jinit()
error: cannot obtain Class.getSimpleName method ID
Error: package 'xlsxjars' could not be loaded
The help page of the xlsx package has a note "NOTE: You may need to add to
your
PATH variable the location of your JVM (e.g. C:/Program
Files/Java/jre6/bin/client) to get rJava working. "
I did add that to the PATH variable using:
> Sys.setenv(PATH=paste(Sys.getenv("PATH"),"C:\\Program
>Files\\Java\\jre6\\bin\\client",collapse=';'))
But the error still persists. Any suggestions?
Thanks
John
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.