Hello Members,
I have posted this message at R-HELP listserv, so my apology for
double posting, but members of R_HELP seem not to know/care about the
problem.

I wonder if someone also having a problem with JRI using new R 2.6.1.
To illustrate the problem, there is a simple Java driver problem
below. The program runs just fine on the other computer with R 2.5.1,
but does not run with R 2.6.1. It gives me no error messages either.
Needles to say, I have jri.dll at the classpath. Also, I have
downloaded the rJava package from R program (packages >> install
packages >> rJava), so version must be correct.

Any suggestions are highly appreciated,
Thanks,
Vlad



import org.rosuda.JRI.Rengine;

public class Driver {

        public static void main(String[] args){
                try {
                        String[] arg = {};
                        Rengine re = new Rengine(arg, false, null);
                        if (!Rengine.versionCheck()) {
                                Rengine.getVersion();
                            System.err.println("** Version mismatch");
                            System.exit(1);
                        }
                        if (!re.waitForR()) {
                            System.out.println("** Cannot load R");
                            System.exit(1);
                        }
                        double d = re.eval("3+5").asDouble();
                        System.out.print("D = " + d);
                } catch (RuntimeException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
                
        }

}

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to