Closed catfoolyou closed 2 months ago
In your log I can clearly see following methods:
sun.java2d
. TeaVM is not based on OpenJDK, so does not provide its implementation for these packages. Looks like TeaVM though takes sun.java2d
from JVM you are running build (which is obviously OpenJDK), but still fails on native methods.What you should do, I don't know, there are plenty of possibilities. You can try to re-write these methods somehow, or you can try to patch original minecraft code (which AFAIK, is officially prohibited by Mojang/MS), or you can write your own implementations of libraries used by minecraft (lwjgl, java2d, etc). However, things with network/sockets would be almost impossible, since from JS one can't work with sockets directly. Perhaps, some relay server could help, but I'm also not sure if it's legal WRT to Mojang tems.
Legal issues aside (this is a hobby project), the most logical step to go about would be use reimplementations of LWJGL and java2d that would work with TeaVM? (these exist.)
Sorry, I can't help you here. It's you to take such decisions.
version 0.9.2
When running generateJavascript I get errors along the lines of
Native method jdk.internal.loader.BootLoader.setBootLoaderUnnamedModule0(Ljava/lang/Module;)V has no implementation
. This happens with both LWJGL related stuff and regular Java native methods.The rest of the log is available here
Do I need to rewrite all of those native methods or am I doing something wrong?