Java 8 Update 25 Can't install to default path, always getting the "static" path
Answers (4)
You can specify the directory that you want to install to by using the INSTALLDIR parameter, using the offline EXE. I also always turn of automatic updates as if you don't, all users that log on will be prompted to upgrade Java, which will try to install to the static address, losing all your good work! Try using this command:
jre-8u25-windows-x64.exe /s INSTALLDIR="C:\Program Files\Java\jre8" AUTO_UPDATE=0
https://community.oracle.com/thread/3637089
Comments:
-
Yes I have commented on that thread. My issue with that answer is that although the path thing might be done on purpose, it is still behaving as a static install even though you don't specify it. You must absolutely uninstall the previous version before installing the next, as in the previous versions it would upgrade instead. - BigPackage 9 years ago
the problem is that Java 1.8.0_25 has in the msi-table the fixed installdir path "jre1.8.0_25".
To change the path, you have to modify the msi-file with a tool like "Orca".
Change the value INSTALLDIR in the Directory-table from "jre1.8.0_25" to "jre8".
This should be working.
Comments:
-
It does work yes, I already tried that. The issue is, it is STILL being treated as a STATIC install. So it will still not upgrade when installing future versions. I know I can tweak the upgrade tables and get it to work, but this is not the default behavior it SHOULD have. This is most probably a mistake on Oracle's part.
I even tested this with the normal consumer install, and it does the same thing. Which means eventually home PC's will have a bunch of stacked Java 1.8 versions on their machines and will not even know. And when the unavoidable security holes show up for older versions.... you see where I'm going ;) - BigPackage 10 years ago-
Just want to ask if you have found a solution on how to update correctly. - Sinimini 9 years ago
-
Don't just update. Use msiexec /x to uninstall and do a complete new install. - iteradrift 9 years ago
-
Not yet, I was hoping to see it fixed in the next release but this issue is still present in 1.8.0.31 - BigPackage 9 years ago
As indicated, whether you specify static or not, the path now always includes the version. And as has also been pointed out, the installer refuses to uninstall the older versions even if you have a non-static install.
Looking at the MSI, the action to remove older versions depends on the condition REMOVEOLDERJRES=1. Is you try to specify that property on the command line with the exe, it rejects it as an invalid property. If you extract the msi file and install using msiexec.exe, you can specify REMOVEOLDERJRES=1 and the setup uninstalls the previous version as part of the setup.
I tested it by installing the u60 versions, then installed u66 with our standard options:
msiexec.exe /i jre-8u66.msi /s INSTALL_SILENT=Enable AUTO_UPDATE=Disable REBOOT=Disable NOSTARTMENU=Enable EULA=DIsable REMOVEOLDERJRES=1 /l*v %TEMP%\jre-8u66.log
Removes u60 and installs u66 as desired.
What property did you set to 0?
How are you setting the path you require? - EdT 10 years ago
The log shows me that it is indeed setting the installdir to C:\Program Files\Java\jre1.8.0_25\\. But anyone who has experience in packaging Java knows that the default path is C:\Program Files\Java\jreX (x being the family, 6, 7, 8 etc)
The purpose of STATIC=1 is to install in a different folder, so that it will always remain on the machine, never to be upgraded by a newer install. So the way it is now, everytime a new version of Java 8 is installed, it will ADD the new java on the machine, leaving also the older version of java 8 on the machine unless specifically uninstalled. This is NOT the default behavior in all previous families of java packages.
I could tweak around the MSI and change it myself, BUT it will still be treated as a static install, so it will still not be upgraded by a newer install. - BigPackage 10 years ago
By the way, have a closer look at this link:
http://www.oracle.com/technetwork/java/javase/silent-136552.html
There is a strong suggestion there that if you don't specify an installdir then it will install into the default location which is based on the version of the JRE, regardless of the setting of the STATIC property. With Oracle, I have learned never to take anything at face value. - EdT 10 years ago
I have even tried the exe with a config file, as mentionned here (http://docs.oracle.com/javase/8/docs/technotes/guides/install/config.html#installing_with_config_file) Same problem. To be sure I have tested other properties in the CFG file and they did in fact work, I seem to be only having problems with the STATIC property.
I have checked your link, although I have done multiple packages of Java7, and never have I had to specify the installdir before.
Thanks for taking the time to answer, I'm trying my luck on Oracle community forum, hope they can tell me anything. - BigPackage 10 years ago
https://www-secure.symantec.com/connect/forums/swv-java-18025-failing
Apparently JRE8 v25 introduces symbolic linking of files. No doubt another Oracle dumb idea designed to give users endless headaches. - EdT 10 years ago
"How can I remove older versions of Java?
Windows users can safely uninstall older versions of Java:
* when installing Java 8 (8u20 and above) or
* by using the Java uninstall tool or
* by manually uninstalling Java for Windows"
http://java.com/en/download/faq/remove_olderversions.xml
I have confirmed the same results from my end as well unfortunately. - worzie 9 years ago
As far as uninstalling, I use WMIC scripts to search and remove any previous Java version. This has worked well but it does take some time for the searches to complete. - JUTN 9 years ago