-
Notifications
You must be signed in to change notification settings - Fork 416
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
Does not launch with Java 10 #1376
Comments
The newest versions should launch fine now 🎉! This isn't an issue related to OptiFine, but launchwrapper (LegacyLauncher). Since Java 9, the AppClassLoader is no longer an URLClassLoader, hence the ClassCastException. Refer to this issue, and this closed Pull Request. Since the module system isn't going away in Java, and Mojang seems to be unwilling to fix LegacyLauncher, OptiFine will need to find a new way to launch. Also see this issue : #192 |
Thanks for the insight. So it doesn't look like it'll get fixed until Mojang decides Java 10 and the new class loading mechanism is worth it. |
This is a launchwrapper problem. |
Come to the -dark side- other launcher. |
@Dushess LegacyLauncher isn't the "Minecraft launcher" normally talked about. It's used to launch legacy versions of Minecraft, as well as mods like Forge and OptiFine. |
Updated launchwrapper by Runemoro, should be compatible with Java 8, 9 and 10: |
Confirming that the NewerJavaCompatibility.zip above, when installed, adds Java 10.0.2 compatibility with Optifine. Would be interesting if Optifine could detect what java version the user is using, and install the above launchwrapper version automatically. Maybe a checkbox for java10 compatibility or something. |
@SylveonBottle No need. Java 9 and onward, including versions with and without long term support, will retain the change ( AppClassLoader not being a URLClassLoader ). I've tested the new modified LegacyLauncher against Java 8, 9, 10 and 11. The fix is backward compatible at least to Java 8, meaning the fix always works with any still-supported Java version. OptiFine can manually include this version of LegacyLauncher, extract it from the JAR when installing, and use it as the dependency. The change requires tweaking the launchwrapper version in the JSON file, from "1.12" to "2.0". From this : "libraries": [
{
"name": "net.minecraft:launchwrapper:1.12"
}
] To this : "libraries": [
{
"name": "net.minecraft:launchwrapper:2.0"
}
] ( 2.0 is the manually included one, it's not official and not available on Mojang's servers. ) |
The above patch works for me, as well. |
can't launch with java 11 |
@gendalv OptiFine won't launch with Java 9, 10, 11, 12, 13 and future versions unless it stops using LegacyLauncher provided by Mojang. sp614x posted a new compatible launchwrapper.jar which you can use to replace the incompatible one 🙂. If you want to download one built from publicly viewable source, you can check out my fork of LegacyLauncher, and download the binaries from the Releases page. |
Any chance someone could explain what to do with the launchwrapper.jar file? |
after you have installed optifine you go to In the rar archive there are 2 folders. First folder inside archive has the structure: Copy the "2.0" folder to Second folder inside archive has the structure: Look at the code inside the 1.13-OptiFine_HD_U_E3_beta3.json file. There is a line saying Now go to Open 1.13.2-OptiFine_HD_U_E6.json and look for the line Save it. In my case and I really don't know why, I had to make the file read-only to apply the changes otherwise the line would say 1.12 again. Now you can launch Minecraft with Java 11 and Optifine. |
Doesn't work on Optifine e7. It will keep deleting the json file and resetting it to default. |
Error details: File hash should be 6d7cc9b1a2a03e4da0a5269f00c61909bd1eb75c but was f50d6d9f4f13e2c457d5aad75ce441b969672e3f Permission denied |
That's after setting the whole directory to read only! Why does the configuration file need to be hash checked? Doesn't that defeat the purpose of a configuration file? |
I guess I am installing java 8! |
@Hopefulfire |
@Hopefulfire the launcher tries to check the hash of everything, but it can't update custom profiles |
Any way to do this with a MultiMC + Forge + Optifine setup (1.12.2)? I found the correct location for the libraries but I don't have an optifine json, and I can't seem to get forge to use it either. I think it tries to pull it from the minecraft server so it says it doesn't exist or something if I try to modify it to use the 2.0 version. |
Yeah I figured it out, thanks. I found it easier to install Java 8 alongside Java 9+, and just use multimc. It has an easy option to specify Java versions, is faster than the default launcher, can load twitch modpacks, and doesn't need to be manually updated or tweaked. |
Also, not sure if the crashing when opening books thing is still an issue; knowing Mojang probably. I don't have the link to the bug, sorry. |
It is in 1.12.2 |
Fixed installer to install launchwrapper-2.0 |
Well, im using 1.14.3 and it still crashes. I have checked everything and it seems to tally. idk what is the issue. |
The text was updated successfully, but these errors were encountered: