Make Java version parsing and checking future-proof #269

Merged
merged 1 commit into from May 30, 2016

Projects

None yet

2 participants

@dgelessus
Contributor
  • Fixed Java version parsing to work with Java 9 (and hopefully future
    versions)
  • Separated Java version getting, parsing and checking
  • New methods to get the launcher or Minecraft Java version as a string
    or int
  • New method to check whether Metaspace should be used instead of
    PermGen when launching Minecraft (so manual checking for each Java
    version isn't necessary)

Fixes #262.

If you want to test, the log now also shows what each version number is parsed to:

Java Version: Launcher: Java 8 (1.8.0_92), Minecraft: Java 8 (1.8.0_92)

This means that the version string is 1.8.0_92 and the launcher parses it as Java version 8.

(Also I assume the launcher has no external API that has to be kept stable? I simply removed OS.getJavaVersion when I added OS.getLauncherJavaVersion and OS.getMinecraftJavaVersion so there's no confusion about which version it gets.)

@dgelessus dgelessus Make Java version parsing and checking future-proof
* Fixed Java version parsing to work with Java 9 (and hopefully future
versions)
* Separated Java version getting, parsing and checking
* New methods to get the launcher or Minecraft Java version as a string
or int
* New method to check whether Metaspace should be used instead of
PermGen when launching Minecraft (so manual checking for each Java
version isn't necessary)
194b063
@RyanTheAllmighty RyanTheAllmighty merged commit 23a9ac8 into ATLauncher:3.3.0.0 May 30, 2016
@RyanTheAllmighty
Member

Cheers 👍

@dgelessus dgelessus added a commit to dgelessus/ATLauncher that referenced this pull request Aug 25, 2016
@dgelessus dgelessus Backport #267 and #269 to master, closes #262 9ccbde7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment