Skip to content

Commit

Permalink
7.5.9
Browse files Browse the repository at this point in the history
- FIX: Java installation not found on Mac.
  • Loading branch information
Osiris-Team committed Jan 27, 2024
1 parent a8c423a commit 808a36c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>com.osiris.autoplug.client</groupId>
<artifactId>autoplug-client</artifactId>
<version>7.5.8</version>
<version>7.5.9</version>
<packaging>jar</packaging>

<name>AutoPlug-Client</name>
Expand Down
29 changes: 11 additions & 18 deletions src/main/java/com/osiris/autoplug/client/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,26 +218,19 @@ private static void createProcess() throws Exception {
if (folders.isEmpty())
throw new Exception("No Java-Installation was found in '" + jreFolder.getAbsolutePath() + "'!");
File javaInstallationFolder = folders.get(0);
File javaBinFolder = null;
for (File folder :
fileManager.getFoldersFrom(javaInstallationFolder)) {// This are the files inside a java installation

if (folder.getName().equalsIgnoreCase("Home")) // For macos support
for (File folder2 :
folder.listFiles()) {
if (folder2.getName().equals("bin")) {
javaBinFolder = folder;
break;
}
}

if (folder.getName().equals("bin")) { // Regular java installations
javaBinFolder = folder;
break;
}
File javaBinFolder = new File(javaInstallationFolder+"/bin");
if(!javaBinFolder.exists()) {
AL.debug(Server.class, "Failed to find Java bin in: "+javaBinFolder);
javaBinFolder = new File(javaInstallationFolder + "/Home/bin"); // For macos support
}
if(!javaBinFolder.exists()) {
AL.debug(Server.class, "Failed to find Java bin in: "+javaBinFolder);
javaBinFolder = new File(javaInstallationFolder + "/HOME/bin"); // For macos support
}
if (javaBinFolder == null)
if (!javaBinFolder.exists()){
AL.debug(Server.class, "Failed to find Java bin in: "+javaBinFolder);
throw new Exception("No Java 'bin' folder found inside of Java installation at path: '" + jreFolder.getAbsolutePath() + "'");
}
File javaFile = null;
if (SystemUtils.IS_OS_WINDOWS) {
for (File file :
Expand Down

0 comments on commit 808a36c

Please sign in to comment.