proper Java command-line for desktop application (amending a3e7732b0393);
authorwenzelm
Sat, 14 Jun 2025 22:19:58 +0200
changeset 82713 6cb555f61f35
parent 82712 2f22014a3a49
child 82714 08dec4389293
proper Java command-line for desktop application (amending a3e7732b0393);
src/Pure/Admin/build_release.scala
--- a/src/Pure/Admin/build_release.scala	Sat Jun 14 21:50:44 2025 +0200
+++ b/src/Pure/Admin/build_release.scala	Sat Jun 14 22:19:58 2025 +0200
@@ -279,7 +279,10 @@
     isabelle_name: String,
     jdk_component: String,
     classpath: List[Path],
-    dock_icon: Boolean = false): Unit = {
+    dock_icon: Boolean = false
+  ): Unit = {
+    val script_classpath =
+      "-classpath " + quote(classpath.map(p => "$ISABELLE_HOME/" + p.implode).mkString(":"))
     val script = """#!/usr/bin/env bash
 #
 # Author: Makarius
@@ -306,11 +309,12 @@
 
 declare -a JAVA_OPTIONS=($(grep -v '^#' "$ISABELLE_HOME/Isabelle.options"))
 
-eval $(isabelle java isabelle.setup.Setup gui_setup)
+eval $("$ISABELLE_JDK_HOME/bin/java" "${JAVA_OPTIONS[@]}" """ + script_classpath +
+  """ isabelle.setup.Setup gui_setup)
 
 exec "$ISABELLE_JDK_HOME/bin/java" \
   "-Disabelle.root=$ISABELLE_HOME" "${JAVA_OPTIONS[@]}" \
-  -classpath """" + classpath.map(p => "$ISABELLE_HOME/" + p.implode).mkString(":") + """" \
+  """ + script_classpath + """ \
   "-splash:$ISABELLE_HOME/lib/logo/isabelle.gif" \
 """ + (if (dock_icon) """"-Xdock:icon=$ISABELLE_HOME/lib/logo/isabelle_transparent-128.png" \
 """ else "") + """isabelle.jedit.JEdit_Main "$@"