title: How to set the classpath for rJava in R?
body: <p>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.<br />
  But now I always get a "NoClassDefFoundError" from rJava, if I call my functions.<br /></p>
  
  <p>In the main package I have an onLoad function, which starts the JVM with the .jpackage function.<br />
  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.</p>
  
  <p>I also tried using </p>
  
  <pre><code>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))
  </code></pre>
  
  <p>Inside the onLoad function.</p>
  
  <p>Any hint would be appreciated,<br />
  Martin</p>