Akarin
Akarin copied to clipboard
[1.16.5] Error occurred when running jar file after compilation
Version: 1.16.5
My Compilation Operations
- Install OpenJDK-11
- Install Maven
- Set http proxy in Maven settings.xml (I am in China)
- Clone the "ver/1.16.5" branch
- Update submodules
- execute
./akarin jar
- No error in compilation process
Error Information
$ java -jar akarin-1.16.5-launcher.jar
An expected class org.apache.logging.log4j.core.impl.ThrowableProxy$CacheEntry was not found for preloading: org.apache.logging.log4j.core.impl.ThrowableProxy$CacheEntry
System Info: Java 11 (OpenJDK 64-Bit Server VM 11.0.15+10-Ubuntu-0ubuntu0.22.04.1) Host: Linux 5.15.0-35-generic (amd64)
Loading libraries, please wait...
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
java.lang.ExceptionInInitializerError
at org.bukkit.craftbukkit.Main.main(Main.java:291)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.papermc.paperclip.Paperclip.main(Paperclip.java:58)
Caused by: java.lang.UnsupportedOperationException: No class provided, and an appropriate one cannot be found.
at org.apache.logging.log4j.LogManager.callerClass(LogManager.java:573)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:598)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:585)
at net.minecraft.server.v1_16_R3.Main.<clinit>(Main.java:26)
... 6 more
Java Verison
openjdk 11.0.15 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1)
OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1, mixed mode)
Output Jar File (split archives)
https://github.com/liups233/Akarin-jar
Please try with OpenJDK 8.
Please try with OpenJDK 8.
It does run with Java 8, but the "Class not found" error still exists. No problem? BTW, why cannot we use higher version of Java for a better performance
I can confirm this issue, both in target/akarin-1.16.5-launcher.jar and Akarin-Server/target/akarin-1.16.5.jar, so it maybe something related to maven shade plugin?
#215 this pr breaks something but I don't know how, can you build it with Java 8 and then run on Java 11? @liups233
However I can build on windows, I don't know why it errors on ubuntu.