JDK-8057611 : jdk/nashorn/internal/scripts/JO* classes are missing from the generated methods dump
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-09-04
  • Updated: 2015-06-04
  • Resolved: 2014-09-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.
JDK 8 JDK 9
8u40Fixed 9 b31Fixed
Description
Running the fresh Nashorn with dumping all classes: 

~/trunks/jdk9-dev/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/java -jar ~/trunks/jdk9-dev/build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/ext/nashorn.jar -Dnashorn.typeInfo.disabled=false --class-cache-size=0 --persistent-code-cache=false -scripting --log=time -d=generated/ test/script/basic/compile-octane.js -- --iterations 1 

...and then trying to load the resulting class files yields lots of NoClassDefFoundError while trying to find lots of Nashorn internal classes, like:
 ...
jdk/nashorn/internal/scripts/JO102P0
jdk/nashorn/internal/scripts/JO10P0
jdk/nashorn/internal/scripts/JO11P0
jdk/nashorn/internal/scripts/JO12
jdk/nashorn/internal/scripts/JO12P0
jdk/nashorn/internal/scripts/JO14P0
jdk/nashorn/internal/scripts/JO155P0
jdk/nashorn/internal/scripts/JO15P0
jdk/nashorn/internal/scripts/JO16
jdk/nashorn/internal/scripts/JO16P0
jdk/nashorn/internal/scripts/JO17P0
jdk/nashorn/internal/scripts/JO192
jdk/nashorn/internal/scripts/JO19P0
jdk/nashorn/internal/scripts/JO1P0
jdk/nashorn/internal/scripts/JO22P0
jdk/nashorn/internal/scripts/JO25P0
 ...

I think these classes are missing from the generated methods dump.