-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not run #1
Comments
Hello, The Nashorn library seems, indeed, that it doesn't work. I'll look into it. |
Thanks! |
Btw, are there some performance penalties in comparison with Nashorn run in Java 8? |
Hey man, any update here? Is there some serious issue? |
Sorry for the delay. I don't have a solution for now, but I have an update. The reason a NullPointerException is occuring, is that the NashornScriptEngineFactory is not registered with the ScriptEngineManager, which means that we cannot get the Nashorn scripting engine. The way a scripting engine must be registered is by providing a META-INF/services/javax.script.ScriptEngineFactory service file containing the full classname of the NashornScriptEngineFactory, which is currently not provided in the archive. I'll try to fix this as soon as possible. Regarding your question about the performance penalties: since this is a backport, the performance will not likely to be exactly the same as the version provided in Java 8. However, it should still be faster than Rhino after it has warmed up (running at least a little script). |
Hello,
Could you please help with the following issue - how exactly am I supposed to use Nashorn from Java 7?
I have the following simple code:
I compile it:
$ javac Nashorn.java
and then I run it:
$ java -cp nashorn-1.0.jar:. Nashorn
nashorn-1.0.jar is in the current folder.
However, there is exception:
Exception in thread "main" java.lang.NullPointerException
at Nashorn.main(Nashorn.java:18)
This means the "engine" is null. And yes, I have only "Mozilla Rhino" registered, but not Nashorn. Where is the mistake, please?
The text was updated successfully, but these errors were encountered: