I have a package for R which contains several jar files.
For better maintenance I want to split the jars in a separate package and have the R source and two small jars in the main package.
But now I always get a "NoClassDefFoundError" from rJava, if I call my functions.
In the main package I have an onLoad function, which starts the JVM with the .jpackage function.
According to the help this function takes a "morePaths" argument, to which I provided the absolute path to the two jar files. But it won't work.
I also tried using
jar.one = paste(lib,pkg,"java","One.jar",sep=.Platform$file.sep)
jar.two = paste(lib,pkg,"java","Two.jar",sep=.Platform$file.sep)
.jinit(classpath=c(jar.one,jar.two))
Inside the onLoad function.
Any hint would be appreciated,
Martin
Try .jaddClassPath
.jaddClassPath("blah.jar")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With