Skip to content

Commit 5e22703

Browse files
committed
just find all classpath jars since versions are not pinned and may change dynamically
1 parent 5ec58f6 commit 5e22703

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

dist/launch_linux.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ JLINK_VM_OPTIONS="\
99
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
1010
--add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"
1111
DIST_DIR=$(dirname $(readlink -f "${BASH_SOURCE[0]}"))
12-
CLASSPATH_OPTIONS="-classpath ${DIST_DIR}/classpath/gson-2.8.9.jar:${DIST_DIR}/classpath/protobuf-java-3.19.3.jar:${DIST_DIR}/classpath/java-language-server.jar"
12+
CLASSPATH_JARS=$(find ${DIST_DIR}/classpath -type f -iname '*.jar'|xargs)
13+
CLASSPATH_OPTIONS="-classpath ${CLASSPATH_JARS}"
1314
${DIST_DIR}/linux/bin/java $JLINK_VM_OPTIONS $CLASSPATH_OPTIONS $@

dist/launch_mac.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ JLINK_VM_OPTIONS="\
99
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
1010
--add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"
1111
DIST_DIR=$(dirname $(readlink -f "${BASH_SOURCE[0]}"))
12-
CLASSPATH_OPTIONS="-classpath ${DIST_DIR}/classpath/gson-2.8.9.jar:${DIST_DIR}/classpath/protobuf-java-3.19.3.jar:${DIST_DIR}/classpath/java-language-server.jar"
12+
echo "dist dir is ${DIST_DIR}"
13+
JAVA_HOME=${DIST_DIR}/mac/bin/java
14+
CLASSPATH_JARS=$(find ${DIST_DIR}/classpath -type f -iname '*.jar'|xargs)
15+
CLASSPATH_OPTIONS="-classpath ${CLASSPATH_JARS}"
1316
${DIST_DIR}/mac/bin/java $JLINK_VM_OPTIONS $CLASSPATH_OPTIONS $@

dist/launch_windows.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ JLINK_VM_OPTIONS="\
99
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
1010
--add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"
1111
DIST_DIR=$(dirname $(readlink -f "${BASH_SOURCE[0]}"))
12-
CLASSPATH_OPTIONS="-classpath ${DIST_DIR}/classpath/gson-2.8.9.jar;${DIST_DIR}/classpath/protobuf-java-3.19.3.jar;${DIST_DIR}/classpath/java-language-server.jar"
12+
CLASSPATH_JARS=$(find ${DIST_DIR}/classpath -type f -iname '*.jar'|xargs)
13+
CLASSPATH_OPTIONS="-classpath ${CLASSPATH_JARS}"
1314
${DIST_DIR}/windows/bin/java $JLINK_VM_OPTIONS $CLASSPATH_OPTIONS $@

0 commit comments

Comments
 (0)