Created
October 13, 2013 14:07
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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