Nashorn Roadmap & Rhino migration question

A. Sundararajan sundararajan.athijegannathan at oracle.com
Fri Aug 1 17:22:26 UTC 2014


I'm addressing question (2). Nashorn uses thread context class loader to 
resolve Java classes from script. So, you can either set thread context 
class loader before creating nashorn script engine. Or  you can use 
jdk.nashorn.api.scripting.NashornScriptEngineFactory class directly. 
NashornScriptEngine.getScriptEngine(ClassLoader) method may be used to 
create an engine instance with user supplied class loader.

See also:

https://wiki.openjdk.java.net/display/Nashorn/Nashorn+jsr223+engine+notes
http://cr.openjdk.java.net/~sundar/jdk.nashorn.api/8u20/javadoc/

Hope this helps,
-Sundar


On Friday 01 August 2014 01:13 AM, Paul Bakker wrote:
> Hi,
>
> Maybe not the right place to ask these questions, but I could not find 
> another place to ask them.
>
> 1: What is the roadmap of Nashorn when it comes to EcmaScript 6. The 
> spec if quite final, mostly bugfixing. Assuming that at some point 
> EcmaScript 6 will be supported in Nashorn, what is the policy to 
> porting support back to existing Java versions? Can we expect to see 
> EcmaScript 6 support in Nashorn in Java 8, or would such features only 
> become available in new Java versions (so 9 or even 10)?
>
> 2: We currently integrate with Rhino directly (not the version what 
> was shipped with Java). One of the features we use is being able to 
> load instantiate Java classes from JavaScript using a custom 
> classloader, using the new Packages(classLoader) syntax (see 
> http://osdir.com/ml/mozilla.devel.jseng/2002-06/msg00037.html). Is 
> this supported in Nashorn so way or the other?
>
> TIA,
>
> Paul



More information about the nashorn-dev mailing list