Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override JAVA_TOOL_OPTIONS when discovering java version #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ getJavaVersion()
#logJavaSearchDebug "getJavaVersion ver line: $java_ver_line"
#echo `expr "'$java_ver_line'" : '.*version.*"\(.*\)"'`
# extracts 1.8.0_144 or 9.0.1
local java_ver=`"$java_bin" -version 2>&1 | grep "version" | awk '{print $3}' | tr -d \"`
local java_ver=`JAVA_TOOL_OPTIONS='' "$java_bin" -version 2>&1 | grep "version" | awk '{print $3}' | tr -d \"`
echo "$java_ver"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if NOT "%JAVA_HOME%"=="" (
call :JavaSearchDebug "Searching PATH..."
for %%X in (java.exe) do (set JAVA_IN_PATH=%%~$PATH:X)
IF DEFINED JAVA_IN_PATH (
call :IsJavaBinVersionAcceptable !JAVA_IN_PATH! !target_java_ver_num! !target_java_ver_max! java_bin_accepted
call :IsJavaBinVersionAcceptable "!JAVA_IN_PATH!" !target_java_ver_num! !target_java_ver_max! java_bin_accepted
if NOT "!java_bin_accepted!" == "" goto :AcceptableJavaBinFound
)

Expand Down Expand Up @@ -166,6 +166,7 @@ GOTO:EOF
:GetJavaBinMajorVersionNum
setlocal
SET java_bin=%~1
SET JAVA_TOOL_OPTIONS=

@REM echo getting ver for: %java_bin%

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set APP_CLASSPATH=%APP_LIB_DIR%\*;

if "%LAUNCHER_DEBUG%"=="1" (
echo ^[LAUNCHER^] java_classpath: %APP_CLASSPATH%
echo ^[LAUNCHER^] java_bin: %java_bin_accepted%
echo ^[LAUNCHER^] java_bin: "%java_bin_accepted%"
)

@REM append extra app and java args?
Expand Down