src/Pure/System/main.scala
author wenzelm
Tue Jul 17 14:33:23 2012 +0200 (2012-07-17)
changeset 48275 31daac3a85ea
parent 48192 07a32140ce0d
permissions -rw-r--r--
more standard main method;
     1 /*  Title:      Pure/System/main.scala
     2     Author:     Makarius
     3 
     4 Default Isabelle application wrapper.
     5 */
     6 
     7 package isabelle
     8 
     9 import scala.swing.TextArea
    10 
    11 
    12 object Main
    13 {
    14   def main(args: Array[String])
    15   {
    16     val (out, rc) =
    17       try {
    18         Platform.init_laf()
    19         Isabelle_System.init()
    20         Isabelle_System.isabelle_tool("jedit", args: _*)
    21       }
    22       catch { case exn: Throwable => (Exn.message(exn), 2) }
    23 
    24     if (rc != 0)
    25       Library.dialog(null, "Isabelle", "Isabelle output",
    26         Library.scrollable_text(out + "\nReturn code: " + rc))
    27 
    28     sys.exit(rc)
    29   }
    30 }
    31