Skip to content

Commit

Permalink
Use parsed java version instead of raw when logging version error, ho…
Browse files Browse the repository at this point in the history
…pefully makes this more clear to users. (#4)
  • Loading branch information
PaintNinja authored May 30, 2024
1 parent 4af4e57 commit 394896e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static void main(String[] args) throws Exception {
int wantedJavaVersion = Integer.parseInt(props.getProperty("Java-Version", "0"));
int currentJavaVersion = getJavaVersion();
if (wantedJavaVersion > currentJavaVersion)
throw new IllegalStateException("Current Java is " + System.getProperty("java.version") + " but we require at least " + wantedJavaVersion);
throw new IllegalStateException("Current Java is " + currentJavaVersion + " but we require at least " + wantedJavaVersion);

if (args.length > 0 && args[0].equals("--onlyCheckJava"))
System.exit(0);
Expand Down

0 comments on commit 394896e

Please sign in to comment.