Skip to content

Commit ecefb96

Browse files
committed
fixing JDK lookup for Windows (resolves #667)
1 parent 93fe201 commit ecefb96

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ protected boolean exportApplication(File destFolder,
951951

952952
XML config = new XML("launch4jConfig");
953953
config.addChild("headerType").setContent("gui");
954+
//config.addChild("headerType").setContent("console");
954955
config.addChild("dontWrapJar").setContent("true");
955956
config.addChild("downloadUrl").setContent(ExportPrompt.JAVA_DOWNLOAD_URL);
956957

@@ -967,7 +968,12 @@ protected boolean exportApplication(File destFolder,
967968
}
968969
XML jre = config.addChild("jre");
969970
if (embedJava) {
970-
jre.addChild("path").setContent("java");
971+
// also falling back to PATH if the "java" folder is later removed
972+
jre.addChild("path").setContent("java;%PATH%");
973+
} else {
974+
// needed to make OpenJDK work properly
975+
// https://github.com/processing/processing4/issues/667
976+
jre.addChild("path").setContent("%PATH%");
971977
}
972978
jre.addChild("minVersion").setContent(MIN_JAVA_VERSION);
973979
for (String opt : runOptions) {

0 commit comments

Comments
 (0)