Jump to: navigation, search


To install Mirah and configure it to run with the SWT libraries:

  • download the latest standalone zip install of Mirah from http://www.mirah.org
  • extract it, say to ~/mirah
  • download the 'SWT Binary and Source' zip for the latest release, and for your platform, from http://download.eclipse.org/eclipse/downloads
  • copy the swt.jar to Mirah's lib directory, e.g. ~/mirah/lib
  • edit the mirah shell script as follows:
  • after the line with:
  • add SWT_CP to the runtime classpath, e.g. replace line:
    "$JAVACMD" $JAVA_OPTS -jar "$MIRAH_CP" run "$@"
    "$JAVACMD" $JAVA_OPTS -jar "$MIRAH_CP" run -c "$SWT_CP" "$@"
  • if on MacOS, SWT needs to run on the first thread of the process, so an extra VM arg is needed. Define an SWT_OPTS var and add it to the end of the existing JAVA_OPTS= line, as follows:
  • make the same edits to the mirahc shell script
  • if on Windows, adapt the above edits to the appropriate command shell syntax in the .bat files
  • add Mirah's bin directory to your path, e.g.:
    export PATH=$PATH:~/mirah/bin
  • you should now be able to compile and run the snippets
    e.g. mirah Snippet1.mirah