-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Feature request]: Replace the "Error: could not find or load main class @user_jvm_args.txt" message #445
Comments
As I mentioned in Discord, it is a message generated by Java/Forge, not SPC, so I can not guarantee anything. :) |
Heya Chorb, just poppin in to let you know that, unfortunately, I haven't had time to investigate this and whether a nice solution would be or is possible. Cheers, |
Its okay! |
Could maybe try to catch the issue before java does within the bash/batch script, i.e add another check like the one for the java-bit-ness Could look like this (At least for the bash script):
Just call it right after the java bitness check |
There is probably also easier or less convoluted ways to do this, but this is what i came up with for now |
I wouldn't be so definite on "use java 8 or else", since you can use up to java 21 on 1.16.5 without issue (requires special args though) |
maybe add another variable to the variables.txt like |
Running a server or client with a newer version of Java results in a major performance boost. |
Java checks are available as of https://github.com/Griefed/ServerPackCreator/releases/tag/6.0.0-alpha.3 Checks are based on the info from MultiMC and the info Chorb posted somewhere, as in MC 1.16 and older can use Java 8 and 11, everything else has a "minimum required" check. This should aleviate at least a portion of problems on the users side for their Java version. |
Thank you so much! I would maybe add an option somewhere to bypass the Java requirement, as some special args can allow super new Java versions to work on older versions. This would only be for advanced users though, so you could add it to variables.txt or something, and add a message when the server gets force-crashed that tells the user? Up to you how you'd want to execute this I suppose, but some sort of bypasss would be nice! Thanks again |
A skip is no problem at all, not even much work. I'll add it. Might be worthwhile to add a section to the SPC help-docs. THe more the merrier. As for the force-crash message: That's a tricky one, as I can't reliably catch the crash reason of the server across all scripts. I'll add a message if the skip is active which get#s displayed after the server stops, regardless of why it stopped. |
The only guide I know of would be https://github.com/embeddedt/ModernFix/wiki/1.16---required-arguments-for-Java-17 |
Whats the feature you would like to be added?
Replace the "Error: could not find or load main class @user_jvm_args.txt" message that is generated when the wrong java version is being used with something more readable such as "Wrong java version installed!"
Anything else you would like to add?
No
Code of Conduct
The text was updated successfully, but these errors were encountered: