Mindustry: strange jre shipped on itch.io

Created on 9 May 2020  路  6Comments  路  Source: Anuken/Mindustry

Platform: Debian GNU/Linux

Build: 104.10

Issue: jre/bin/java -version reports "zulu" openjdk 8 u 131
the advancecontent mod fails to load on startup, classdefnotfoundexception, does not occur when reloading mods

Steps to reproduce:

  1. jre/bin/java -version
  2. jre/bin/java -jar desktop.jar
  3. look at the errors?

Link to mod(s) used, if applicable:

https://github.com/EyeOfDarkness/AdvanceContent

Place an X (no spaces) between the brackets to confirm that you have read the line below.

  • [X] I have searched the closed and open issues to make sure that this problem has not already been reported.

Most helpful comment

Why deprecate the flagship function of java 8 in the first place?

1) They create garbage in the main loop if used incorrectly.
2) It's not supported on Android <7, which means a significant portion of the userbase will crash upon loading the mod.

you may want to update documentation

The classes are now blacklisted in 6.0, so those mods won't work at all, regardless of device.

All 6 comments

gotta add that it fails because it can't find intstream from java 8 because the zulu version is not actually java 8 but is just faking it

The JRE isn't 'strange', it's stripped of everything except the core Java [n]io/lang/util/etc library. There's no need for it to be there.

intstream

Don't use IntStream, or any other API from Java 7+ like Stream or Function. It's excluded for a good reason.

I see, thanks for answering. Though I can't believe that a pretty popular mod is using an API you deem deprecated. Why deprecate the flagship function of java 8 in the first place? It seems to work alright with a regular openjdk 8 or 11.

@Anuken FWIW there seems to be mod developers using the unwanted Java 7+ API outside of expected environment you may want to update documentation or somehow educate the developers for best practices to avoid this behavior.

See https://github.com/EyeOfDarkness/AdvanceContent/issues/1
See https://github.com/JerichoFletcher/mechanical-warfare/issues/18

Why deprecate the flagship function of java 8 in the first place?

1) They create garbage in the main loop if used incorrectly.
2) It's not supported on Android <7, which means a significant portion of the userbase will crash upon loading the mod.

you may want to update documentation

The classes are now blacklisted in 6.0, so those mods won't work at all, regardless of device.

still occurs, the mods never mentioned IntStream anyways

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KurzedMetal picture KurzedMetal  路  3Comments

BasedUser picture BasedUser  路  4Comments

nodevlfrb picture nodevlfrb  路  3Comments

Matitron picture Matitron  路  4Comments

bendnuts picture bendnuts  路  3Comments