I am developing an application that uses Eclipse framework on Windows. I have to call R from Java. I downloaded rJava package and installed it. I set the classpath in the Run Dialog in Eclipse to the directory where the JRI.jar is. I set the Path environmental variable to the directory where R.dll and jri.dll are. Yet when I run the rtest example (in jri/examples directory), I get the following error. Cannot find JRI native library! Please make sure that the JRI native library is in a directory listed in java.library.path. java.lang.UnsatisfiedLinkError: no jri in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at org.rosuda.JRI.Rengine.<clinit>(Rengine.java:9) at sample.rtest.main(rtest.java:54) I think I have put jri.jar in all the places that i need to. Yet I am unable to get the program to work. Any help is much appreciated. Thanks, Madhura
The native *.dll can't be found for any reason. For a first start simply put the native lib in your Eclipse Java project. If you are developing a plugin or a RCP application a must read is this article: http://www.eclipsezone.com/articles/eclipse-vms/ explaining how to load and place native libs. With kind regards Marcel -- View this message in context: http://www.nabble.com/Java-to-R-interface-tp17672475p17674386.html Sent from the R help mailing list archive at Nabble.com.
Try and make sure that R is in your windows Path variable I got your message when I first did this, but when I did the about it then worked... =============================================================================Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ============================================================================= [[alternative HTML version deleted]]
The path to R/bin is in the Windows PATH variable. Yet I get this error. On Jun 6, 10:37?am, "Dumblauskas, Jerry" <jerry.dumblaus... at credit- suisse.com> wrote:> Try and make sure that R is in your windows Path variable > > I got your message when I first did this, but when I did the about it > then worked... > > ===========================================================================?==> Please access the attached hyperlink for an important electronic communications disclaimer: > > http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html > ===========================================================================?==> > ? ? ? ? [[alternative HTML version deleted]] > > ______________________________________________ > R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
So the system path is set. In your props you set the jar (otherwise you will not compile) But, in your class you run with did you pass as a system call the path to jri? In my system I pass it in as such -Djava.library.path=C:\R\R-2.7.0\library\rJava\jri If I remove that I get your error.... (in eclispe this is in the arguments tab in the vm section) Hth The path to R/bin is in the Windows PATH variable. Yet I get this error. On Jun 6, 10:37 am, "Dumblauskas, Jerry" <jerry.dumblaus... at credit- suisse.com> wrote:> Try and make sure that R is in your windows Path variable > > I got your message when I first did this, but when I did the about it > then worked...=============================================================================Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ==============================================================================
I know this is an old thread but, since the issue posted here has not been solved, if someone is still needing help, I suggest to have a loook at http://www.gisos.de/blog/articles/5/jri-and-eclipse-first-steps -- View this message in context: http://r.789695.n4.nabble.com/Java-to-R-interface-tp896243p2262359.html Sent from the R help mailing list archive at Nabble.com.