Skip to content

Commit 5e8e27b

Browse files
committed
Fix: Allow JDK folders starting with "jdk" or "jdk-" during export
The export logic in JavaBuild.java previously looked only for JDK folders starting with "jdk-". However, the embedded JDK may simply be named "jdk", causing path resolution to fail and no JRE to be bundled. This leads to macOS launch issues like JRExLoadFullError and JRELoadError. Updated the filter to also allow "jdk" prefixes.
1 parent b8c0857 commit 5e8e27b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/src/processing/mode/java/JavaBuild.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ protected boolean exportApplication(File destFolder,
751751
try {
752752
var jdk = Files.list(new File(resources).toPath())
753753
.filter(Files::isDirectory)
754-
.filter(p -> p.getFileName().toString().startsWith("jdk-"))
754+
.filter(p -> p.getFileName().toString().matches("jdk[-\\d].*"))
755755
.findFirst()
756756
.orElseThrow();
757757
var target = new File(contentsFolder, "PlugIns/");

0 commit comments

Comments
 (0)