Skip to content

Commit

Permalink
Use -version instead of --version in Java Version Check
Browse files Browse the repository at this point in the history
It is more compatible with older Java versions

Fixes #24
  • Loading branch information
TechnicJelle committed Sep 10, 2024
1 parent b07c2e3 commit b5dd9e2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Future<int> checkJavaVersion(String javaPath) async {
}

try {
ProcessResult jv = await Process.run(javaPath, ["--version"]);
ProcessResult jv = await Process.run(javaPath, ["-version"]);
final int exitCode = jv.exitCode;
final String stdout = jv.stdout;
final String stderr = jv.stderr;
Expand Down

0 comments on commit b5dd9e2

Please sign in to comment.