From 0ab2cc3bfe1e7a1e77117a05f3a8b91d793b263f Mon Sep 17 00:00:00 2001 From: "Vladimir.Orlov" Date: Fri, 15 Jul 2016 11:15:15 +0300 Subject: [PATCH] IDEA-158516 idea.bat is using %BITS% for USER_JDK_FILE before it's initialized --- bin/scripts/win/idea.bat | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/scripts/win/idea.bat b/bin/scripts/win/idea.bat index 6ef406ccc23c..e40302ee716a 100644 --- a/bin/scripts/win/idea.bat +++ b/bin/scripts/win/idea.bat @@ -10,8 +10,12 @@ :: --------------------------------------------------------------------- IF EXIST "%@@product_uc@@_JDK%" SET JDK=%@@product_uc@@_JDK% IF NOT "%JDK%" == "" GOTO jdk +SET BITS=64 +SET USER_JDK64_FILE=%USERPROFILE%\.@@system_selector@@\config\@@vm_options@@.jdk +SET BITS= SET USER_JDK_FILE=%USERPROFILE%\.@@system_selector@@\config\@@vm_options@@.jdk -IF EXIST "%USER_JDK_FILE%" SET/pJDK=<%USER_JDK_FILE% +IF EXIST "%USER_JDK64_FILE%" ( SET/pJDK=<%USER_JDK64_FILE% +) ELSE ( IF EXIST "%USER_JDK_FILE%" SET/pJDK=<%USER_JDK_FILE% ) IF "%JDK%" == "" GOTO jdk0 IF EXIST "%JDK%" GOTO jdk SET JDK=%~dp0\..\%JDK% @@ -33,7 +37,6 @@ IF NOT EXIST "%JAVA_EXE%" GOTO error SET JRE=%JDK% IF EXIST "%JRE%\jre" SET JRE=%JDK%\jre -SET BITS= IF EXIST "%JRE%\lib\amd64" SET BITS=64 :: ---------------------------------------------------------------------