-
-
Save BlazerYoo/45afbe055b3861866096ac684ef7a5ff to your computer and use it in GitHub Desktop.
Compile and execute Java programs with one command
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
file_name=$1 | |
echo Compiling $file_name... | |
javac $file_name | |
echo Successfully compiled $file_name. | |
echo Executing $file_name... | |
shift | |
java ${file_name%%.java} $@ |
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
file_name=$1 | |
echo Compiling $file_name... | |
javac-introcs $file_name | |
echo Successfully compiled $file_name. | |
echo Executing $file_name... | |
shift | |
java-introcs ${file_name%%.java} $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment