After updating the JDK10 source base to use ASM6, AMS produces bad class files, when used with nashorn. All the details have been documented in the openjdk issue: https://bugs.openjdk.java.net/browse/JDK-8186802