You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
575 B
17 lines
575 B
3 years ago
|
#Builds a runnable jar file using ${MAIN_CLASS} as an entry point and then runs the newly generated jar.
|
||
3 years ago
|
#Java
|
||
3 years ago
|
rm -Rf bin/*
|
||
|
javac -Xlint:unchecked -cp src -d bin ${PROJECT_DIR}/${PROJECT_NAME}.java
|
||
|
printf "\n\n\nGenerating Manifest...\n\n"
|
||
|
touch manifest
|
||
|
echo "Main-Class: ${MAIN_CLASS}" >> manifest
|
||
|
printf "\n\n\nCreating Jar...\n\n"
|
||
3 years ago
|
ORIGINAL_LOC=$(pwd)
|
||
3 years ago
|
cd ${OUT_DIR}
|
||
3 years ago
|
jar cfm ${PROJECT_NAME}.jar ${ORIGINAL_LOC}/manifest sig
|
||
3 years ago
|
printf "\n\n\nRunning Program...\n\n"
|
||
3 years ago
|
java -jar ${PROJECT_NAME}.jar "$@"
|
||
3 years ago
|
mv ${PROJECT_NAME}.jar ${ORIGINAL_LOC}
|
||
3 years ago
|
cd ..
|
||
3 years ago
|
./${LANGUAGE}/scripts/clean.sh
|