default Isabelle application wrapper -- JVM entry point for Isabelle.exe;
authorwenzelm
Sun, 22 Apr 2012 15:50:29 +0200
changeset 47663 20e0865ae9e7
parent 47662 206bf8c4860d
child 47664 3f9681ca7040
default Isabelle application wrapper -- JVM entry point for Isabelle.exe;
src/Pure/System/main.scala
src/Pure/build-jars
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Pure/System/main.scala	Sun Apr 22 15:50:29 2012 +0200
@@ -0,0 +1,33 @@
+/*  Title:      Pure/System/main.scala
+    Author:     Makarius
+
+Default Isabelle application wrapper.
+*/
+
+package isabelle
+
+import scala.swing.TextArea
+
+
+object Main
+{
+  def main(args: Array[String]) =
+  {
+    val (out, rc) =
+      try {
+        Platform.init_laf()
+        Isabelle_System.init()
+        Isabelle_System.isabelle_tool("jedit", args: _*)
+      }
+      catch { case exn: Throwable => (Exn.message(exn), 2) }
+
+    if (rc != 0) {
+      val text = new TextArea(out)
+      text.editable = false
+      Library.dialog(null, "Isabelle", "Isabelle output", text)
+    }
+
+    System.exit(rc)
+  }
+}
+
--- a/src/Pure/build-jars	Sun Apr 22 15:19:46 2012 +0200
+++ b/src/Pure/build-jars	Sun Apr 22 15:50:29 2012 +0200
@@ -47,6 +47,7 @@
   System/isabelle_charset.scala
   System/isabelle_process.scala
   System/isabelle_system.scala
+  System/main.scala
   System/platform.scala
   System/session.scala
   System/session_manager.scala