[R] Troubles in SJava

Tsumiyama Isao tsumi at leo.auric.ne.jp
Sat Jan 19 17:05:50 CET 2002


OS              : Win95
R Version     : 1.4.0
JDK Version : 1.3.0


Hi, R-statisticians all over the world.

I'm trying to handling R objects in the Java code as follows:

[c:\myjava\R2JTest.java]
import org.omegahat.R.Java.*;

class R2JTest {
    public static void main(String args[]) {
        REvaluator e = new REvaluator();
        Object val = e.eval("objects()");
        int i;

        if (val != null) {
            String[] objs = (String[])val;
            
            for (i = 0; i < objs.length; i ++) {
                System.err.println("(" + i + ")" + objs[i]);
            }
        } 
    }
};

The environment variables CLASSPATH and R_HOME were set as follows:

CLASSPATH=c:\Progra~1\rw1040\library\SJava
R_HOME=c:\Progra~1\rw1040

And the path "c:\Progra~1\rw1040\library\SJava\libs" was included in
the environment variable PATH.

Then the Java code above passes through the compiler, but in executing
the program, JVM gives me the error message as follows:

java.lang.UnsatisfiedLinkError: no SJava in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
	at java.lang.Runtime.loadLibrary0(Runtime.java:749)
	at java.lang.System.loadLibrary(System.java:820)
	at
org.omegahat.R.Java.RForeignReference.<clinit>(RForeignReference.java:25)
	at R2JTest.main(R2JTest.java:5)
Exception in thread "main" 

It seems that the file "SJava.dll" does not be identified by the 
Java interpreter.
Are there any invalid or wrong setting of environment variables? 

Thanks in advance.

>From a Japanese future biostatistician(?)

##################################
#  Tsumiyama Isao   
#  Mitubishi Pharma Corp.
#  e-mail:tsumi at leo.auric.ne.jp
##################################
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list