bukkit-runtime
bukkit-runtime copied to clipboard
Incompatible with Apple Silicon
J2V8 does not seem to work for Apple's M1 arm64.
$ npm run serve results in the following error:
[17:46:25 ERROR]: [org.bukkit.craftbukkit.v1_17_R1.CraftServer] J2V8 native library not loaded initializing plugin-name v0.1.0 (Is it up to date?)
java.lang.IllegalStateException: J2V8 native library not loaded
at com.eclipsesource.v8.V8.checkNativeLibraryLoaded(V8.java:195) ~[cr-jar-output-3141070486.jar:?]
at com.eclipsesource.v8.V8.createV8Runtime(V8.java:149) ~[cr-jar-output-3141070486.jar:?]
at com.eclipsesource.v8.V8.createV8Runtime(V8.java:125) ~[cr-jar-output-3141070486.jar:?]
at com.eclipsesource.v8.NodeJS.createNodeJS(NodeJS.java:58) ~[cr-jar-output-3141070486.jar:?]
at com.eclipsesource.v8.NodeJS.createNodeJS(NodeJS.java:45) ~[cr-jar-output-3141070486.jar:?]
at io.customrealms.runtime.Runtime.<init>(Runtime.java:51) ~[cr-jar-output-3141070486.jar:?]
at io.customrealms.jsplugin.JsPlugin.setup(JsPlugin.java:39) ~[cr-jar-output-3141070486.jar:?]
at io.customrealms.jsplugin.JsPlugin.<init>(JsPlugin.java:29) ~[cr-jar-output-3141070486.jar:?]
at io.customrealms.MainPlugin.onLoad(MainPlugin.java:30) ~[cr-jar-output-3141070486.jar:?]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.loadPlugins(CraftServer.java:425) ~[patched_1.17.1.jar:git-Paper-399]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:287) ~[patched_1.17.1.jar:git-Paper-399]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1220) ~[patched_1.17.1.jar:git-Paper-399]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-399]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.UnsatisfiedLinkError: Could not load J2V8 library. Reasons:
no j2v8_macosx_armv7l in java.library.path: /Users/falco/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
at com.eclipsesource.v8.LibraryLoader.loadLibrary(LibraryLoader.java:75) ~[cr-jar-output-3141070486.jar:?]
at com.eclipsesource.v8.V8.load(V8.java:71) ~[cr-jar-output-3141070486.jar:?]
at com.eclipsesource.v8.V8.createV8Runtime(V8.java:145) ~[cr-jar-output-3141070486.jar:?]
... 12 more
Apparently j2v8 has dropped support for macOS altogether: https://github.com/eclipsesource/J2V8/issues/556#issuecomment-896128464
Tried to run it with the following java builds:
% java --version
openjdk 17.0.2 2022-01-18 LTS
OpenJDK Runtime Environment Zulu17.32+13-CA (build 17.0.2+8-LTS)
OpenJDK 64-Bit Server VM Zulu17.32+13-CA (build 17.0.2+8-LTS, mixed mode, sharing)
% java --version
openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment Homebrew (build 17.0.2+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.2+0, mixed mode, sharing)
Found a possible alternative for J2V8: https://github.com/caoccao/Javet/. Maybe this will also make it easier to fix https://github.com/customrealms/bukkit-runtime/issues/8.
Apple Silicon support was recently added 👍