|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
nashorn Script Engine NullPointerException
Hello! Our team is trying to use Java 8s new nashorn engine on the new roboRIO, as it runs Java 8. However, we have encountered a NullPointerException every time we call new ScriptEngineManager().getEngineByName("nashorn"). After a little debugging, we know it is the method getEngineByName that is returning null. We have tried rhino, simply getting every javascript engine, but we keep getting returned null. Is this a problem with the fact the roboRIO is running an embedded version of Java 8? Can another team try this?
|
|
#2
|
|||
|
|||
|
Re: nashorn Script Engine NullPointerException
Quote:
Code:
private static String[] JRE_CREATE_COMMAND = {"java",
"-jar",
"", // This is the JRECreate jar location
"--dest", "JRE", // This is the folder that you need to put in /usr/local/frc
"--profile", "compact2",
"--vm", "client",
"--keep-debug-info",
"--debug"
};
|
|
#3
|
|||
|
|||
|
Re: fsilberberg
Thanks for the documentation I was able to create a jre haven't tested it on the RoboRio yet.
I have another question. Is this legal for competition? I don't want to ruin the spirit of FIRST hears what I added Code:
private static String[] JRE_CREATE_COMMAND = {"java",
"-jar",
"", // This is the JRECreate jar location
"--dest", "JRE", // This is the folder that you need to put in /usr/local/frc
"--profile", "compact2",
"--vm", "client",
"--keep-debug-info",
"--debug"
"--extension", "nashorn"
};
Last edited by Qormix : 21-01-2015 at 10:54. |
|
#4
|
||||
|
||||
|
Re: fsilberberg
Quote:
This should be totally legal for FIRST. The Linux kernel on the roboRIO is simply an interface to the FPGA, the important stuff (sending PWM signals, etc) is done outside of the power of the kernel. The spirit* of FIRST is to inspire technology, learning how to embed java runtimes on linux kernels is certainly inspiring ![]() |
|
#5
|
|||
|
|||
|
Re: fsilberberg
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|