Skip to content

Commit 94dee41

Browse files
committed
Removed hardcoded JDK
1 parent a5985c3 commit 94dee41

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

app/src/processing/app/Platform.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff 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";

0 commit comments

Comments
 (0)