jsmile + R software

The engine.
Post Reply
alex
Posts: 1
Joined: Wed Mar 29, 2017 2:07 pm

jsmile + R software

Post by alex »

Hi,
I just started working with jsmile + R, following the tutorial in the wiki.
rJava package was successfully installed and loaded as well as JVM started.
But I get the following error when try to declare an instance of a network:

Code: Select all

net = .jnew("smile/Network")
Error in .jnew("smile/Network") : java.lang.ClassNotFoundException
Could you give me some hints?
Best
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: jsmile + R software

Post by shooltz[BayesFusion] »

When launching the JVM with .jinit you need to ensure that classpath and java.library.path are correctly set.

Code: Select all

.jinit(classpath="<full name of the smile.jar file, including directory>", 
parameters="-Djava.library.path=<directory where jsmile.dll or jsmile.so is located, without filename>")
Note that when you use RGui on Windows and you've called .jinit without parameters or with parameters specified incorrectly, you'll need to restart the RGui, because JVM is only launched by first .jinit call. In such case, restart the GUI and try again. I'm not sure how this works on a Mac or Linux.
Post Reply