ADDITIONAL SYSTEM INFORMATION :
openjdk version "1.8.0_462"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_462-b08)
OpenJDK 64-Bit Server VM (Temurin)(build 25.462-b08, mixed mode)
openjdk version "17.0.16" 2025-07-15
OpenJDK Runtime Environment Temurin-17.0.16+8 (build 17.0.16+8)
OpenJDK 64-Bit Server VM Temurin-17.0.16+8 (build 17.0.16+8, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
When I try to use the getEngineByName method of javax.script.ScriptEngineManager to get an engine named "nashorn", I find that my current OpenJDK 17 is unable to retrieve this Engine correctly. When I execute my submitted test code, I observe that the factory in OpenJDK 8 can find the ScriptEngine named "Oracle Nashorn", but OpenJDK 11 and later (OpenJDK 11+) cannot retrieve it successfully. Is this because this feature is no longer supported in the newer versions, or is it a defect that needs to be fixed?
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Oracle Nashorn
---------- BEGIN SOURCE ----------
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
public class test {
public static void main(String[] var0) throws ScriptException {
ScriptEngineManager scriptEngineManager = new ScriptEngineManager();
for (ScriptEngineFactory engineFactory : scriptEngineManager.getEngineFactories()) {
System.out.println(engineFactory.getEngineName());
}
}
}
---------- END SOURCE ----------