IDEA-149864 Switch boot JDK on Windows shouldn't appear since unavailable

Updated idea.bat to handle bundled jdk
This commit is contained in:
Alexey Ushakov
2016-03-11 08:34:03 +03:00
parent d699e1be0f
commit a194197852
+8 -2
View File
@@ -6,12 +6,18 @@
:: ---------------------------------------------------------------------
:: Locate a JDK installation directory which will be used to run the IDE.
:: Try (in order): @@product_uc@@_JDK, ..\jre, JDK_HOME, JAVA_HOME.
:: Try (in order): @@product_uc@@_JDK, @@vm_options@@.jdk, ..\jre, JDK_HOME, JAVA_HOME.
:: ---------------------------------------------------------------------
IF EXIST "%@@product_uc@@_JDK%" SET JDK=%@@product_uc@@_JDK%
IF NOT "%JDK%" == "" GOTO jdk
SET USER_JDK_FILE=%USERPROFILE%\.@@system_selector@@\config\@@vm_options@@.jdk
IF EXIST "%USER_JDK_FILE%" set/pJDK=<%USER_JDK_FILE%
IF EXIST "%USER_JDK_FILE%" SET/pJDK=<%USER_JDK_FILE%
IF "%JDK%" == "" GOTO jdk0
IF EXIST "%JDK%" GOTO jdk
SET JDK=%~dp0\..\%JDK%
GOTO jdk
:jdk0
IF NOT "%JDK%" == "" GOTO jdk
IF EXIST "%~dp0\..\jre" SET JDK=%~dp0\..\jre
IF NOT "%JDK%" == "" GOTO jdk