Consider downloading and using the Java 32 bit version from: * https://java.com/en/download/manual.jsp
Personally, I override the default installation location and set it to:
c:\Program Files (x86)\Java\Current\
When it's finished installing I do copy the dir to a folder that lists the version.
c:\Program Files (x86)\Java\vxxxx\
The reason I do this is so that I don't have to update all the various places that might point to it, such as the PATH variable (see below).
You'll be surprised by how tricky setting a Service Account's Environment Variables can get: * IT:AD:Environment Variables:HowTo:Tips Regarding PATH Notice especially the unintuitive nature of setting Local User Environment Variables…
A huge amount of Java applications originally designed for Linux environments rely on finding the JAVA_HOME System IT:AD:Environment Variables
Set it from the command line:
# As An Administrator, due to /m switch: SETX JAVA_HOME "C:\Program Files (x86)\Java\Current" /m
Ensure the path to the Bin directory is in the PATH IT:AD:Environment Variables.
You may find that there is already something like the following within the System PATH:
C:\ProgramData\Oracle\Java\javapath;
which indirectly points back to C:\Program Files (x86)\Java\Current\java.exe
But if it's not there, since you just defined JAVA_HOME, you can Append to PATH the following:
`%JAVA_HOME%\bin\`
As per IT:AD:Powershell:HowTo:Snippets:Work with Environment Variables:
function AddPathToPATHEnvironmentVariable([string]$path, [string]$pattern, [string]$scope="Machine"){
if (!$pattern){
$pattern = $path;
}
if (!$Env:path.ToLower().Contains($pattern.ToLower()))
{
$tmpPath = [Environment]:: GetEnvironmentVariable("Path",$scope);
[Environment]:: SetEnvironmentVariable("Path", $tmpPath + ";"+ $path, $scope)
return $true;
}
return $false;
}