Open jankolkmeier opened 2 years ago
Apologies. The solution for us was to manually add the graal dependencies to the ivy. (We are using flipper through the hmibuild liblocal). I guess not catching whether the engine initialized successfully (and providing the user with an insightful error message) could still be a nice improvement :)
I once made the change to support graal.js, but didn't really look into the check for initialization. I did test Flipper with Java 11 and graal.js, so that should work at least as well.
We were unable to get the latest Flipper to work for our project with ASAP.
After some digging it seems like the
engine
in JsEngine is never really (successfully) initialized (i.e. here). Looks like usingnashorn
instead ofgraal.js
still works fine for us (in an isolated test case). We're using the java version "1.8.0_301". Java 1.8 is recommended for ASAP at the moment.My best explanation is that the 1.8 versions of javax.script.XXXX libs simply don't support
graal.js
yet? The best solution of course would be to get ASAP/hmibuild to work with a more recent version of java, but independently, maybe we can do some changes here:mgr.getEngineByName
doesn't seem to throw if it can't find/init the requested engine, can we add a check to whetherengine
is initialized successfully/not-null?