I want to use JavaScript in one of my Java applications. So I ran this test:
javax.script.ScriptEngineManager manager = new ScriptEngineManager();
javax.script.ScriptEngine engine = manager.getEngineByName("JavaScript");
System.out.println(engine);
javax.script.List<ScriptEngineFactory> factories = manager.getEngineFactories();
System.out.println(factories.isEmpty());
Result:
null
true
So there's no JavaScript on default liberty profile. How do I activate that?
You may need to build up a
server.xml
similar to the default one in liberty on Bluemix. You can do this by uploading Liberty and yourserver.xml
to Bluemix. Bluemix will pull out theserver.xml
and enable that feature. Go here for more info.Basically everything in
wlp/usr/servers/<yourservername>
needs to be uploaded to Bluemix with acf push
fromwlp/usr/servers/<yourservername>
.