Skip to content
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

[Improvement]: Recommend/Warn Java 8 for older Minecraft versions in script #479

Closed
1 task done
kreezxil opened this issue Nov 6, 2023 · 10 comments
Closed
1 task done
Assignees
Labels
bug Something isn't working

Comments

@kreezxil
Copy link
Sponsor

kreezxil commented Nov 6, 2023

What happened?

Now that Minecraft and server pack creator are well beyond the Java 8 packs, especially 1.12.2, we have an interesting issue happening.

Most users have a newer than java 8 install on their systems. If they try run install.sh or .ps1 using the not java 8 java the libaries folder will fail to extract.

This was pointed out to me with my https://www.curseforge.com/minecraft/modpacks/world-of-dragons
server pack. Took a fair bit to understand what was happening.

Since I"m pack and on again off again mod dev, i naturally have a lot of javas on hand so, once I told variables text to use java8 (that's what i called my java 8 binary), the library extracted.

What did you expect to happen?

Through no fault of SPC, I did kind of expect the installer script to actually extract libraries folder, but thinking about it ... I think I'd want it to tell the user that it expects a different version of java to do its thing. this may be too much to ask for and yes I know as each day marches on, less and less do we see java 8 servers running.

Version

4.3.2 and 5.0.0-beta.10

Relevant log output

log captured from the console, there is some kind of socket except when using java 17 and the libraries refuse to extract from the java 8 compiled jar.

https://paste.centos.org/view/6b1f66a1

variables.txt: https://paste.centos.org/view/412df769

variables.txt (**but now it points to my java 8 binary**): https://paste.centos.org/view/2bbf5aea

The now functioning log: https://paste.centos.org/view/fd5798ad

Anything else you would like to add?

Keep up the good work, and I'm not holing my breath as stated above.

If you are using the webservice, in which browers did you encounter this bug?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kreezxil kreezxil added the bug Something isn't working label Nov 6, 2023
@Griefed
Copy link
Owner

Griefed commented Nov 6, 2023

Heya Kreezxil,

ohhhh so now we have the reverse situation at hand, did I understand that correctly?
Whereas before we have people trying to run newer packs with older Java versions, people are now trying to run older packs with newer Java versions?

@Griefed
Copy link
Owner

Griefed commented Nov 6, 2023

Related to this: #445
The aforementioned issue talks about people running server packs with older Java versions and whether we have a way to capture / check / prevent and maybe inform the user in an easy-to-understand way.

@kreezxil
Copy link
Sponsor Author

kreezxil commented Nov 6, 2023

Yes, apparently this is the UNO reverse card.

@Griefed Griefed changed the title [Bug]: java 8 based server packs no longer install right [Improvement]: Recommend/Warn Java 8 for older Minecraft versions in script Jan 4, 2024
@Griefed
Copy link
Owner

Griefed commented Mar 31, 2024

Heya Kreezxil,

if I remember correctly, you usually have multiple Java installations available on your machine. I'd like some feedback from people's environments other than my own (sanity check). Could you run the following command and post the return from it here?

which -a java | xargs -I{} echo "echo {};{} -version;echo" | sh

It should list all Java installations available in the system path and print their versions. Trying to determine whether that would be a viable way to discover available Java installations in a bash-script.

Cheers

@kreezxil
Copy link
Sponsor Author

kreezxil commented Apr 1, 2024

I've actually done a Linux reset since talking about that, because I experimented way too much, however, I have java in two locations and your command produced the following output.

/usr/bin/java
openjdk version "17.0.10" 2024-01-16
OpenJDK Runtime Environment (build 17.0.10+7)
OpenJDK 64-Bit Server VM (build 17.0.10+7, mixed mode)

/usr/lib/jvm/default/bin/java
openjdk version "17.0.10" 2024-01-16
OpenJDK Runtime Environment (build 17.0.10+7)
OpenJDK 64-Bit Server VM (build 17.0.10+7, mixed mode)

@Griefed
Copy link
Owner

Griefed commented Apr 1, 2024

Thanks for the feedback.
That looks like the command found the symlink (1st one) as well as the actual installation (2nd one).

I'll run some more tests on my end soonish.

@kreezxil
Copy link
Sponsor Author

kreezxil commented Apr 1, 2024

I responded too quick, I check my /usr/lib/jvm and it did not detect my other installations of Java 8 and Java 22.

@Griefed
Copy link
Owner

Griefed commented Jun 2, 2024

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.

@Griefed
Copy link
Owner

Griefed commented Jun 24, 2024

Check out the latest alpha build: https://github.com/Griefed/ServerPackCreator/releases/tag/6.0.0-alpha.11

It not only has Java compatibility checks, which were added in alpha 3, but also automated Java installation based on the Java version recommended by Mojang themselves.

I'd appreciate some tests on this. :)

@Griefed
Copy link
Owner

Griefed commented Jul 26, 2024

Available as of 6.0.0

@Griefed Griefed closed this as completed Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants