No Script Engines found [message #1859742] |
Sat, 24 June 2023 04:26  |
Eclipse User |
|
|
|
Dear All,
I would like to request some support.
I can not get to work JavaScript in my Java project. Script engine manager retrurns with null value if I call it with "null" parameter too.
(I used to work with Eclips on Java development for years, now I re-started it again after more than one and half year, so I was out of information flow about changes in Eclipse)
I have tried the prev. code to check available JavaScript engines:
"ScriptEngineManager sem = new ScriptEngineManager();
List<ScriptEngineFactory> factories = sem.getEngineFactories();
for (ScriptEngineFactory factory : factories)
System.out.println(factory.getEngineName() + " " +
factory.getEngineVersion() + " " + factory.getNames());
if (factories.isEmpty())
System.out.println("No Script Engines found"); "
It returns with No Script Engine found.
1. Installed softwares:
-Eclipse version:
Version: 2023-03 (4.27.0)
Build id: 20230309-1520
- Java8 update 371
-Liberica JDK 8.0.362.9
2. Settings
JRE: JavaSE 1.8
Could you please help me to solve this issue?
|
|
|
Re: No Script Engines found [message #1859758 is a reply to message #1859742] |
Mon, 26 June 2023 03:30  |
Eclipse User |
|
|
|
The problem could be that the JavaScript engine is not being loaded correctly in your Eclipse instance. If you haven't done so already, try adding the "rhino" JavaScript engine library to your classpath. Rhino is a JavaScript runtime for Java and is typically used in such scenarios.
Also, check if you're using the correct version of Java. Some engines might not work well with Java 8 and would require you to update to a newer version. So, if possible, consider updating your Java version to Java 11 or above.
Let us know how it goes and if the problem still persists, we'll figure it out together!
|
|
|
Powered by
FUDForum. Page generated in 0.02988 seconds