src/Pure/System/main.scala
changeset 47663 20e0865ae9e7
child 47664 3f9681ca7040
--- /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)
+  }
+}
+