-
Notifications
You must be signed in to change notification settings - Fork 105
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
Fix for project jigsaw ClassLoader change #11
Conversation
Status? |
Jigsaw has ben murged into tha main jdk9 dev builds so what is the status on this? |
Java 9 in now feature complete so what is the status on this PR? |
I'm going to close this without fixing it, because this is only fixing a superficial problem. Jigsaw will rip apart the guts of projects such as Forge and FML: there are no longer any guarantees that things like classpaths even exist, and JAR formats are no longer going to be directly inspectable. This breaks so much about FML and Forge, that this is quite literally the least of my worries. @grum I strongly recommend you make vanilla crash and burn on 9 as well. |
@cpw You should never kill non-Forge mod loaders' attempt to support Java 9 just because of Forge gets broken.
This is generally kidnapping vanilla to only support Forge. People have the right to reject a monopoly. Forge is not the official mod API yet! |
@liach Mentioning me with an @ and then editing the post to remove said mention after I receive an email about it is pretty nasty, IMHO. Anyhow, I have to agree. Forge is not the only user of LegacyLauncher - unless you want to explicitly declare that LegacyLauncher is designed strictly for Forge and all other uses are merely a side-effect, "breaking Java 9" should be Forge's responsibility, not LegacyLauncher's. |
I can tell you for sure that this change would mess up MultiMC. So would Java 9 for that matter. MultiMC does not start Java with anything Minecraft-related on the classpath, only its own The So please, do not assume that the system classloader or |
@asiekierka Sorry, but I thought that I should not make you involved because you should not really comment and get attacked by some forge supporters. |
@liach I suspect that loading resource packs will be affected as well. If you think you can handle all the modularization aspects, I would recommend you to go ahead and demonstrate full functionality of the client under J9. Good luck! I don't think Forge won't be along for the ride, at least, not in any recognizable form, compared to today. |
IMO this should be implemented so that other tweak class based software (optifine, liteloader) have the ability to launch on systems using Java 9 |
So yeah this is not going to get fixed and all mods will be stuck on Java 8? |
@FrancisDaPugtato See https://github.com/cpw/modlauncher |
@liach right. But the new modlauncher is not yet finished (and afik it's not sure when it will be finished), so I think there should be a work around (maybe together with a warning, that using java 9 is not recommended), so that people don't get that annoying crash, just because they are using java 9. I'm already using this workaround for quite a long time, and i din't expect any issues. |
There is some sort of hacky classloader that redirects all calls to sun packages to jdk.internal and added opens to everything internal. That doesn't worth it, considering no mod requires the features of java 9. You should look forward to java 10 instead. |
Okay. But to achieve that the LegacyLauncher is basically working (which is the most important thing for the normal user, that just wonders why vanilla minecraft is working fine but e.g optifine not) you just need the code above. That would allow devs to use java 9 if they want. And if not they can use a previous version of the LegacyLauncher. |
@SetantaLP Java 9 sucks. It does not even allow modifying enums without arguments (before you can modify them freely). I sincerely persuade you to STOP asking modders to switch to Java 9. |
Doesn't change nothing, if Forge won't support Java 9 - they won't bump their LaunchWrapper dep. On top of that, MC itself is likely to require some changes (as previously mentioned in regards to resource packs) - so why would Mojang introduce J9 support to LaunchWrapper if they don't seem to have any intention of updating modern MC? Jigjaw removes any guarantees that we had before, that makes a library like LaunchWrapper very difficult to start working on J9. Considering that Mojang's official use of it, is to get legacy MC versions working (which they wont be making changes to), taking note that their functionality will be broken on J9 (through no fault of LaunchWrapper's) - why would Mojang support Java 9? And this is all without stating that Mojang's MC team (the original one, the true one - not the bedrock one) is completely preoccupied by the massive undertaking that is 1.13 (lwjgl3, commands, item metadata, etc). |
Java 9 might suck. And I don't ask modders to use java 9. I only said that it should be up to the devs who use the launch wrapper for their tools to decide if they want to allow java 9 or not. Currently they can only say: "Sorry, I can't solve that problem, because it's outside my code." And as I said, I use minecraft (with optifine) on java 9 and I don't have any problems with resource packs or anything else (besides the launchwrapper), because there are no dependencies into affected packages in vanilla according to jdeps. And Minecraft more or less works like a normal java program (which means it doesn't try to inject code somewhere), so the team doesn't have to change anything. And of course it's officially used for making legacy version working (which are not designed to be played on newer java versions), but it's also allows to be used for other stuff. So I think it should be updated to be able to run on java 9 versions, so it's up to the people who use it for their tools to allow java 9 or not. |
@SetantaLP Unfortunately, I don't get your point. Are you advertising your workaround or asking for official support? We don't prohibit anyone from using that hacky tool. For official support, you should ask a mojang staff on twitter instead. |
I only explain why there should be a fix/workaround for the classloader-problem. |
There are a few solutions already. I don't think such a workaround will be integrated into the launch wrapper right now. You can create your own repository to host the workaround (someone already did that), but here is not the right place for you to explain. |
This is kind of ridiculous though. Java is on v11 by now. Java 8 is old. IS the modlauncher going to support the newer versions? |
Modlauncher already supports java 11, I think. |
AdoptOpenJDK just released OpenJDK 15, with 11 still being the main LTS. My assumption? Maybe when we hit java 20 or java 30 and the main community realizes that we're slightly behind. |
Minecraft runs fine all on Java versions from 8 and above, what do you mean? |
I think you mean "isn't compatible with anything below java 8". Also, just because it was bought out by microsoft doesn't mean that the creators/developers behind the game suddenly swapped over to being money hungry. They don't need microsoft's approval to make the game compatible with later java versions. |
In project jigsaw the appclassloader is no longer a URLClassLoader becus URLClassLoader is backed by an URLClassPath and in project jigsaw is it posebule to run without a classpath using modulepath instead
and
if you want to try jigsaw ea builds are here
here is a stacktrace to show the problem