Created
July 16, 2011 17:23
-
-
Save digitalpardoe/1086564 to your computer and use it in GitHub Desktop.
TextMate, Java & Compiling
This file contains hidden or 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
echo "<h2>Compiling $TM_FILENAME</h2>" | |
cd "$TM_DIRECTORY" | |
javac -encoding UTF8 "$TM_FILENAME" &> >("${TM_RUBY:-ruby}" -rtm_parser -eTextMate.parse_errors) |
This file contains hidden or 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
echo "<h2>Compiling $TM_FILENAME</h2>" | |
cd "$TM_DIRECTORY" | |
javac -encoding UTF8 "$TM_FILENAME" &> >("${TM_RUBY:-ruby}" -rtm_parser -eTextMate.parse_errors) | |
if (($? >= 1)); then exit; fi | |
osascript <<EOF | |
tell application "Terminal" | |
activate | |
try | |
close front window | |
end try | |
do script "cd '$TM_DIRECTORY'; java '${TM_FILENAME%.java}'" | |
end tell | |
EOF |
This file contains hidden or 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
echo "<h2>Compiling $TM_FILENAME</h2>" | |
cd "$TM_DIRECTORY" | |
javac -encoding UTF8 "$TM_FILENAME" &> >("${TM_RUBY:-ruby}" -rtm_parser -eTextMate.parse_errors) | |
if (($? >= 1)); then exit; fi | |
{ java -Dfile.encoding=utf-8 "${TM_FILENAME%.java}" echo -e "\nProgram exited with status $?."; }|pre |
This file contains hidden or 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
echo "<h2>Compiling $TM_FILENAME</h2>" | |
cd "$TM_DIRECTORY" | |
javac -encoding UTF8 "$TM_FILENAME" &> >("${TM_RUBY:-ruby}" -rtm_parser -eTextMate.parse_errors) | |
if (($? >= 1)); then exit; fi | |
export CURRENT_DIR=`pwd | sed -n 's/.*\///p'` | |
{ java -Dfile.encoding=utf-8 $CURRENT_DIR."${TM_FILENAME%.java}" echo -e "\nProgram exited with status $?."; }|pre |
This file contains hidden or 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
osascript <<EOF | |
tell application "Terminal" | |
activate | |
try | |
close front window | |
end try | |
do script "cd '$TM_DIRECTORY'; java '${TM_FILENAME%.java}'" | |
end tell | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment