JDK-8062386 : Different versions of nashorn use same code cache directory
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 8u40,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2014-10-29
  • Updated: 2015-06-04
  • Resolved: 2014-11-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
8u40Fixed 9 b39Fixed
Related Reports
Relates :  
Relates :  
This situation default for 8u40 and reproduce for jdk9 with --optimistic-types=false
For reproduce I run the same command : 
jjs --persistent-code-cache=true --optimistic-types=false  array-micro.js
for jdk9 b36 and b33 and i had error:
Exception in thread "main" java.lang.NullPointerException
        at jdk.nashorn.internal.runtime.Context.install(Context.java:1237)
        at jdk.nashorn.internal.runtime.Context.compile(Context.java:1180)
        at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:1111)
        at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:556)
        at jdk.nashorn.tools.Shell.runScripts(Shell.java:317)
        at jdk.nashorn.tools.Shell.run(Shell.java:169)
        at jdk.nashorn.tools.Shell.main(Shell.java:133)
        at jdk.nashorn.tools.Shell.main(Shell.java:112)

If i remote nashorn_code_cache this Exception don't reproduce.