Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 34 lines (26 sloc) 810 Bytes
#!/bin/bash
# Project name
PRJNAME=checkallpvs
# Directory to the java class files
BINDIR=build/classes
# Directory to the java src files
SRCDIR=src/$PRJNAME
# Directory to the third-party libraries
LIBDIR=dist/lib
JSONLIB=json-20160810.jar
if [ $# -eq 0 ]; then
echo "Expected one argument but none specified."
echo "Usage: $ ./compileAndRun.sh <argument>"
echo "where <argument> can be 'compile' or 'run'"
exit
fi
if [ "$1" == "compile" ]; then
javac -d ${BINDIR} -sourcepath ${SRCDIR} -cp ${LIBDIR}/${JSONLIB} ${SRCDIR}/*.java
cp ${SRCDIR}/*.fxml ${BINDIR}/${PROJNAME}
elif [ "$1" == "run" ]; then
java -cp ${BINDIR}:${LIBDIR}/${JSONLIB} ${PRJNAME}.Main
else
echo "I've got an input argument, $1, but it's not what I've expected."
echo "It should be 'compile' or 'run'."
exit
fi