Skip to content

Commit

Permalink
If select Java Home, it is considered a single Java has been selected
Browse files Browse the repository at this point in the history
  • Loading branch information
ri-fumo committed Dec 15, 2024
1 parent d46f6c3 commit 497fa82
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ void onAddJava() {
File directory = chooser.showDialog(Controllers.getStage());
if(directory == null) return;

final File file = new File(directory, OperatingSystem.CURRENT_OS.getJavaExecutable());
File file = new File(directory, OperatingSystem.CURRENT_OS.getJavaExecutable());
file = file.exists()? file
: new File(file, "bin" + File.separator + OperatingSystem.CURRENT_OS.getJavaExecutable());
if(file.exists()) {
onAddJavaBinary(file.toPath());
return;
Expand Down

0 comments on commit 497fa82

Please sign in to comment.