File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed
Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -405,22 +405,8 @@ static public File getJavaHome() {
405405 }
406406
407407 var home = System .getProperty ("java.home" );
408- if (home != null ){
409- if (new File (home , "bin/java" ).exists ()){
410- return new File (home );
411- }else {
412- String os = System .getProperty ("os.name" ).toLowerCase ();
413- // Default installation paths for different operating systems
414- if (os .contains ("windows" )) {
415- var programFiles = new File (System .getenv ("ProgramFiles" ));
416- return new File (programFiles , "Eclipse Adoptium/jdk-17.0.10+7-hotspot" );
417- } else if (os .contains ("mac" )) {
418- return new File ("/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home" );
419- } else {
420- // Linux and others
421- return new File ("/usr/lib/jvm/temurin-17-jdk" );
422- }
423- }
408+ if (home != null && new File (home , "bin/java" ).exists ()){
409+ return new File (home );
424410 }
425411 if (Platform .isMacOS ()) {
426412 //return "Contents/PlugIns/jdk1.7.0_40.jdk/Contents/Home/jre/bin/java";
You can’t perform that action at this time.
0 commit comments