ScriptCraft icon indicating copy to clipboard operation
ScriptCraft copied to clipboard

Does not work with GraalVM R21.2.0 - java type error

Open ediloren opened this issue 4 years ago • 3 comments

Trying to use GraalVM leads to java type error (GraalVM cannot access java types by default, because of security considerations).

I patched ScriptCraft to work with GraalVM with the GraalJS JavaScript engine.

Tested under Win10, GraalVM R21.2.0, SpigotMC R1.17.1.

You may try it using the fork https://github.com/ediloren/ScriptCraft. Includes instructions in the updated 'ReadMe'.

ediloren avatar Aug 27 '21 15:08 ediloren

Thank you for the fix @ediloren ! works for me!

carlosble avatar Oct 02 '21 14:10 carlosble

This worked, but only if I used GraalVM 20.3 (and MC 1.16.5). There was also an error org.graalvm.polyglot.PolyglotException: TypeError: logger["log(java.util.logging.Level,java.lang.String)"] is not a function, but I was able to get the correct result for js 1+1

jrennie avatar Jan 08 '22 18:01 jrennie

The "howl" example at https://github.com/ediloren/ScriptCraft worked for me, but the up() function doesn't seem to be defined and blocks doesn't seem to be defined

jrennie avatar Jan 08 '22 19:01 jrennie