Skip to content

Instantly share code, notes, and snippets.

@hantuzun
Created October 13, 2013 14:07
Show Gist options
  • Save hantuzun/6962747 to your computer and use it in GitHub Desktop.
Save hantuzun/6962747 to your computer and use it in GitHub Desktop.
Shell file for running .class files on a XTerm window. Used for compiling and running Java source files directly from Sublime Text 3 on Ubuntu 13.10.
#!/bin/bash
# Called by Java.sublime-build
# Located in /usr/bin
# $1 := $file_path
# $2 := $file
# $3 := $file_base_name
# Runs .class files on a XTerm window
# sets window name to file name
# prompts user after termination
cd $1
/usr/bin/javac $2
/usr/bin/xterm -fa 'DejaVu Sans Mono' -fs 11 -e "/bin/bash -c \" /usr/bin/java $3; echo -ne '\033]0; $3 \007'; echo ''; echo '>> Program terminated.'; read line;\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment