Trying to integrate R with my Java application usi

2019-05-19 13:56发布

I need to integrate Java with R to run some math commands and make plots using features of R. Following part of code is giving error.

    public static void main(String[] args){

            HelloRWorld r = new HelloRWorld();
            r.helloRWorld();
    }

    public void helloRWorld() {

            // using rengine to connect to r
            rengine.eval(String.format("greeting <- '%s'", "Hello R World"));
            REXP result = rengine.eval("greeting");
            System.out.println("Greeting from R: "+ result.asString());
    }

That's the error I'm getting and have no idea about it. Is this something related to JFrames? A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006c726036, pid=5360, tid=5956

JRE version: Java(TM) SE Runtime Environment (8.0_11-b12) (build 1.8.0_11-b12) Java VM: Java HotSpot(TM) 64-Bit Server VM (25.11-b03 mixed mode windows-amd64 compressed oops) Problematic frame: C [R.dll+0x26036]

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

An error report file with more information is saved as: D:\Java\R\hs_err_pid5360.log

If you would like to submit a bug report, please visit: http://bugreport.sun.com/bugreport/crash.jsp The crash happened outside the Java Virtual Machine in native code. See problematic frame for where to report the bug.

标签: java r jri
0条回答
登录 后发表回答