Skip to content

Commit a9e048a

Browse files
committed
U fixes the path to the JRE on MacOS if release file not found
1 parent 3770905 commit a9e048a

File tree

1 file changed

+3
-3
lines changed
  • src/main/java/io/github/fvarrui/javapackager/packagers

1 file changed

+3
-3
lines changed

src/main/java/io/github/fvarrui/javapackager/packagers/Packager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,14 @@ protected void bundleJre(File destinationFolder, File jarFile, File libsFolder,
228228

229229
Logger.info("Embedding JRE from " + specificJreFolder);
230230

231-
// fixes the path to the JRE on MacOS
232-
if (platform.equals(Platform.mac)) {
231+
// fixes the path to the JRE on MacOS if "release" file not found
232+
if (platform.equals(Platform.mac) && !FileUtils.folderContainsFile(specificJreFolder, "release")) {
233233
specificJreFolder = new File(specificJreFolder, "Contents/Home");
234234
}
235235

236236
// checks if valid jre specified
237237
if (!JDKUtils.isValidJRE(platform, specificJreFolder)) {
238-
throw new Exception("Invalid JRE specified for '" + platform + "' platform: " + jrePath);
238+
throw new Exception("Invalid JRE specified for '" + platform + "' platform: " + specificJreFolder);
239239
}
240240

241241
// removes old jre folder from bundle

0 commit comments

Comments
 (0)