Skip to content
Prev 148 / 29559 Next

Using SJava?

Hopefully, I'm not too late on this one....when you initialize the JVM you
need to set the class path as follows:

.JavaInit(config=javaConfig(classPath="StringDirectoryPathReference"))

or

.JavaInit(config=javaConfig(classPath=c("String1", "String2")))

for example:

.JavaInit(config=javaConfig(classPath="C:\javastuff"))

where javastuff contains my class files.  You need to specify the jar file
name if you are trying to include class files within jars.  I have used it
with some classes that I wrote.  

I too am excited about linking Java and R, as there is so much useful code
in the Java community.

Benjamin Stabler
Transportation Planning Analysis Unit
Oregon Department of Transportation
555 13th Street NE, Suite 2
Salem, OR 97301  Ph: 503-986-4104