-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task runClient unable to launch in OpenJDK 8 for ForgeGradle 2.3 #652
Comments
This is already fixed in 1.15.x, and FG2 is very unlikely to get updates anymore (because 1.12.2 is no longer supported). Especially since this only affects dev environment. |
@DaemonUmbra I guess that even if I made a pull request for this it would be denied? |
Lex has actually asked anyone who's willing to do so, to get older versions working with FG3, so I would say that would be preferable |
FG2 is dead due to its extreme age and hard reliance on old Gradles. |
Maybe make a PR for this? |
Adding Forum label to kill this as any effort should go towards FG3 rather than previous versions. |
👋 We use the issue tracker exclusively for final bug reports and feature requests. However, this issue appears to be better suited for the Forge Modder Support Forums. Please create a new topic on the Modder Support forum with this issue, and the conversation can continue there. |
There has been an update to OpenJDK 8 Java that breaks the launch of minecraft with the
runClient
gradle task. InGradleStart
there is ahackNatives
function that hacks the Java library path to include Minecraft's native libraries. This code depends on inner workings of how Java loads native libraries. This behavior has recently changed to only load library paths on JVM startup.How it used to work:
sys_paths
tonull
and adds the minecraft natives directory tojava.library.path
property at start of the task.awt
system library.ClassLoader
checks ifsys_paths
is null, which istrue
, and then re-initializes the library paths.awt
is loaded normally and boot continues.Behavior after Java update:
sys_paths
tonull
and adds the minecraft natives directory tojava.library.path
property at start of the task.awt
system library.ClassLoader
does not check ifsys_paths
is null, and crashes with a NullPointerException.Exception log:
Full log: https://pastebin.com/jVYg2ZX8
ForgeGradle hack code:
ForgeGradle/src/main/resources/GradleStart.java
Line 84 in 6084129
OpenJDK 8u commit which changed the behavior: http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/1d666f78532a/
Corresponding OpenJDK issue: https://bugs.openjdk.java.net/browse/JDK-8235886
Possible solution:
Change hack to be like Option 2 in this post: https://stackoverflow.com/questions/15409223/adding-new-paths-for-native-libraries-at-runtime-in-java/15409446#15409446
The text was updated successfully, but these errors were encountered: