Include source and target version variables for java language

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
Nic0Nic0Nii 2022-05-23 18:29:02 +00:00
parent d3ac418132
commit 792b9ea483
4 changed files with 9 additions and 4 deletions

View File

@ -1,7 +1,8 @@
#Builds and runs the project.
#Java
source ${LANGUAGE}/scripts/version_info
rm -Rf out/*
javac -Xlint:unchecked -cp ${PROJECT_DIR}/.. -d ${OUT_DIR} ${PROJECT_DIR}/*.java
javac -source ${SOURCE_VERSION} -target -target ${TARGET_VERSION} -Xlint:unchecked -cp ${PROJECT_DIR}/.. -d ${OUT_DIR} ${PROJECT_DIR}/*.java
printf "\n\n\nRunning Program...\n\n"
ORIGINAL_LOC=$(pwd)
cd $OUT_DIR

View File

@ -1,7 +1,8 @@
#Builds a runnable jar file using ${MAIN_CLASS} as an entry point and then runs the newly generated jar.
#Java
source ${LANGUAGE}/scripts/version_info
rm -Rf bin/*
javac -Xlint:unchecked -cp src -d bin ${PROJECT_DIR}/${PROJECT_NAME}.java
javac -source ${SOURCE_VERSION} -target -target ${TARGET_VERSION} -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

View File

@ -1,4 +1,5 @@
build.sh:377a432ffbd63b53322d1451a214201d -
build.sh:c6b1071d15271ad7ea9d8b190e741301 -
clean.sh:96ce35f2d2dcb555421e00a6afda23ca -
commit.sh:5e4448db9ad48e72ec3a1ff4f5763b41 -
jar.sh:cce5e429168700490f9c413b665d13d6 -
jar.sh:dd20151fedff690e2cbe0aede3458e13 -
version_info:20a04c1bbb5a25087e253185d73156e8 -

2
Java/scripts/version_info Executable file
View File

@ -0,0 +1,2 @@
define SOURCE_VERSION "1.11"
define TARGET_VERSION "1.8"