[R] SJava, another UnsatisfiedLinkError

Pauline Gu gu4 at llnl.gov
Thu Aug 15 20:20:55 CEST 2002

Thanks for Professor Ripley and Brad's reply.

UnsatisfiedLinkError: SJava.dll is gone.  But, I have another problem.  I 
have been trying to figure out, but, without success.

Here is my test.java:
import java.io.*;
import org.omegahat.R.Java.REvaluator;

public class test {
     public static void main(String args[]) {
         org.omegahat.R.Java.REvaluator e = new REvaluator();
         Object val = e.eval("objects()");

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

And here is my callR.win:


# If the caller gives a class name, use that.
# Otherwise, we will look for the environment variable JCLASS
# or use the JavaRCall example

if test -n "$1" ; then


# Ensure R_HOME is set and available to Java.
#export R_HOME

# Ensure that we can find SJava.dll and RInterpreter.dll
export PATH="${PATH}:${R_HOME}/library/SJava/libs:${R_HOME}/bin"
#echo ${PATH}

# Now the classpath for the Omegahat and related Jar files, etc.


# We are ready
#java -classpath ${CLASSPATH} ${JCLASS}

#echo "javac -classpath ${CLASSPATH} bla.java"

javac -classpath ${CLASSPATH} test.java
java -classpath ${CLASSPATH} test

And here is my error message:
Exception in thread "main" java.lang.UnsatisfiedLinkError: eval
         at org.omegahat.R.Java.REvaluator.eval(Native Method)
         at org.omegahat.R.Java.REvaluator.eval(REvaluator.java:86)
         at org.omegahat.R.Java.REvaluator.eval(REvaluator.java:36)
         at test.main(test.java:9)

Note: I have tried test.java with the REvaluator's call function, 
ROmegahatInterpreter's constructor function.  They all gave me the same 
UnsatisfiedLinkError: call
UnsatisfiedLinkError: initR

I suspect the native functions in R is not working correctly from 
Java.  Can anyone give me some hint?

Thanks for your time.


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