src/Pure/System/main.scala
author wenzelm
Sun, 22 Apr 2012 15:50:29 +0200
changeset 47663 20e0865ae9e7
child 47664 3f9681ca7040
permissions -rw-r--r--
default Isabelle application wrapper -- JVM entry point for Isabelle.exe;

/*  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)
  }
}