Skip to content

Commit

Permalink
fixing JDK lookup for Windows (resolves #667)
Browse files Browse the repository at this point in the history
  • Loading branch information
benfry committed Feb 18, 2023
1 parent 93fe201 commit ecefb96
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion java/src/processing/mode/java/JavaBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@ protected boolean exportApplication(File destFolder,

XML config = new XML("launch4jConfig");
config.addChild("headerType").setContent("gui");
//config.addChild("headerType").setContent("console");
config.addChild("dontWrapJar").setContent("true");
config.addChild("downloadUrl").setContent(ExportPrompt.JAVA_DOWNLOAD_URL);

Expand All @@ -967,7 +968,12 @@ protected boolean exportApplication(File destFolder,
}
XML jre = config.addChild("jre");
if (embedJava) {
jre.addChild("path").setContent("java");
// also falling back to PATH if the "java" folder is later removed
jre.addChild("path").setContent("java;%PATH%");
} else {
// needed to make OpenJDK work properly
// https://github.com/processing/processing4/issues/667
jre.addChild("path").setContent("%PATH%");
}
jre.addChild("minVersion").setContent(MIN_JAVA_VERSION);
for (String opt : runOptions) {
Expand Down

0 comments on commit ecefb96

Please sign in to comment.