From 5a596e28da51dc176e52a79369cd0252ac59e266 Mon Sep 17 00:00:00 2001 From: fszimnau Date: Wed, 19 Nov 2025 10:49:01 +0100 Subject: [PATCH] set main class as entry point --- deployProject.sh | 6 +++++- runProject.sh | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/deployProject.sh b/deployProject.sh index 226a725..03cced8 100644 --- a/deployProject.sh +++ b/deployProject.sh @@ -6,4 +6,8 @@ if [[ ! -e dist ]]; then mkdir dist; fi rm -r dist/* 2>/dev/null; -jar cf ../dist/zeitlaeufer.jar target/**/*; +dir=$(pwd) +cd target; +# --create --file <=> cf +jar --create --file=../dist/zeitlaeufer.jar --main-class=de.szimnau.zeitlaeufer.Main ./**/*; +cd $dir diff --git a/runProject.sh b/runProject.sh index 06e9358..dda98b6 100644 --- a/runProject.sh +++ b/runProject.sh @@ -3,12 +3,12 @@ set -uo pipefail # when executed as executable file in "git for windows" bash some things won't work, so always run with prefixed command originDir=$(pwd); -cd ~/zeitlaeufer/; +cd /g/zeitlaeufer/; tmpDir="/tmp/zeitlaeufer_$RANDOM"; mkdir $tmpDir; cp dist/zeitlaeufer.jar $tmpDir; cd $originDir; # java -cp $tmpDir/zeitlaeufer.jar $@; # -p <=> --module-path | -m <=> --module -java --module-path $tmpDir/zeitlaeufer.jar --module zeitlaeufer/$@; +java --module-path $tmpDir/zeitlaeufer.jar --module zeitlaeufer $@; rm -r $tmpDir;