From 8ea318f296af27090d335a6754d65f5b62f949d0 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Thu, 29 Feb 2024 12:24:51 +0100 Subject: [PATCH] Using jar from javac location --- run.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run.sh b/run.sh index d1abf56..8d0b842 100644 --- a/run.sh +++ b/run.sh @@ -17,9 +17,9 @@ function ljava() { echo "use java from JAVA_HOME [${LJAVA}]" echo "use javac from JAVA_HOME [${LJAVAC}]" elif [ $( which java ) ]; then - LJAVA=$( which java ) - LJAR=$( which jar ) - LJAVAC=$( which javac ) + LJAVA=$( readlink -f $(which java) ) + LJAVAC=$( readlink -f $(which javac) ) + LJAR="$(dirname ${LJAVAC})/jar" echo "use java from PATH [${LJAVA}]" echo "use java from PATH [${LJAVAC}]" else