File tree Expand file tree Collapse file tree
e2e-test/e2e-test-builder/src/main/resources/template Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,16 @@ echo "Hostname: $(hostname)"\n\
3636echo "Start Time: $(date)"\n\
3737echo "=========================================="\n\
3838echo "Starting Application..."\n\
39- exec java -jar app.jar\n' > /startup.sh && \
39+ JAVA_VERSION_STRING=$(java -version 2>&1 | head -n 1 | cut -d \\" -f 2)\n\
40+ JAVA_VERSION=$(echo "$JAVA_VERSION_STRING" | cut -d . -f 1)\n\
41+ if [ "$JAVA_VERSION" = "1" ]; then\n\
42+ JAVA_VERSION=$(echo "$JAVA_VERSION_STRING" | cut -d . -f 2)\n\
43+ fi\n\
44+ JAVA_OPTS="$JAVA_OPTS"\n\
45+ if [ "$JAVA_VERSION" -ge 9 ] 2>/dev/null; then\n\
46+ JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED"\n\
47+ fi\n\
48+ exec java $JAVA_OPTS -jar app.jar\n' > /startup.sh && \
4049 chmod +x /startup.sh
4150
4251ENTRYPOINT ["/startup.sh"]
You can’t perform that action at this time.
0 commit comments