mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 11:53:49 +07:00
[platform] 32-bit JRE detection in Windows launchers (IDEA-229379)
GitOrigin-RevId: 3e7c7acf3042a6a4c3dd3b415b5d5dff08ca604a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
de452c6c08
commit
52c60e9788
Binary file not shown.
Binary file not shown.
@@ -288,16 +288,9 @@ bool LocateJVM()
|
||||
|
||||
if (FindJVMInSettings()) return true;
|
||||
|
||||
std::vector<std::string> jrePaths;
|
||||
if(need64BitJRE) jrePaths.push_back(GetAdjacentDir("jbr"));
|
||||
if(need64BitJRE) jrePaths.push_back(GetAdjacentDir("jre64"));
|
||||
jrePaths.push_back(GetAdjacentDir("jre32"));
|
||||
jrePaths.push_back(GetAdjacentDir("jre"));
|
||||
for(std::vector<std::string>::iterator it = jrePaths.begin(); it != jrePaths.end(); ++it) {
|
||||
if (FindValidJVM((*it).c_str()) && Is64BitJRE(jvmPath) == need64BitJRE)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (FindValidJVM(GetAdjacentDir(need64BitJRE ? "jbr" : "jre32").c_str()) && Is64BitJRE(jvmPath) == need64BitJRE)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (FindJVMInEnvVar("JAVA_HOME", result))
|
||||
|
||||
@@ -33,14 +33,12 @@ IF NOT "%JDK%" == "" (
|
||||
IF EXIST "%JDK%" GOTO check
|
||||
)
|
||||
|
||||
IF EXIST "%IDE_HOME%\jbr" SET JDK=%IDE_HOME%\jbr
|
||||
IF EXIST "%JDK%" GOTO check
|
||||
IF EXIST "%IDE_HOME%\jre64" SET JDK=%IDE_HOME%\jre64
|
||||
IF EXIST "%JDK%" GOTO check
|
||||
IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
|
||||
IF EXIST "%IDE_HOME%\jbr" SET JDK=%IDE_HOME%\jbr
|
||||
IF EXIST "%JDK%" GOTO check
|
||||
)
|
||||
IF EXIST "%IDE_HOME%\jre32" SET JDK=%IDE_HOME%\jre32
|
||||
IF EXIST "%JDK%" GOTO check
|
||||
IF EXIST "%IDE_HOME%\jre" SET JDK=%IDE_HOME%\jre
|
||||
IF EXIST "%JDK%" GOTO check
|
||||
|
||||
IF EXIST "%JDK_HOME%" SET JDK=%JDK_HOME%
|
||||
IF EXIST "%JDK%" GOTO check
|
||||
@@ -61,7 +59,7 @@ IF EXIST "%JRE%\jre" SET JRE=%JDK%\jre
|
||||
IF EXIST "%JRE%\lib\amd64" (
|
||||
SET BITS=64
|
||||
) ELSE (
|
||||
IF EXIST "%JRE%\lib\jrt-fs.jar" SET BITS=64
|
||||
IF EXIST "%JRE%\bin\windowsaccessbridge-64.dll" SET BITS=64
|
||||
)
|
||||
|
||||
:: ---------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user