/build/static/layout/Breadcrumb_cap_w.png

Java 8 Update 25 Can't install to default path, always getting the "static" path

Hi,
I'm having issues with my Java 8 package. The usual default path for Java installations C:\Program Files\Java\jreN (N being version, obviously so jre6, jre7, jre8 etc)
But mine is installing in STATIC mode even though I do not specify it anywhere. Whatever I try it goes in C:\Program Files\Java\jre1.8.0_25

I work with the extracted MSI. I've forced the property to 0, Disable (tried both), still won't install in jre8.
I've tried with the offline EXE just to test, same result, even when I use a CFG file in the command line (jre-8u25-windows-i586 /INSTALLCFG=pathtomyfile.cfg. I know it's reading my file because i used the INSTALL_SILENT=Enable in this file and it work perfectly. Yet STATIC=Disable or STATIC=0 does nothing, it installs in the STATIC path no matter what I try.

Any ideas what might be wrong?

Thanks in advance for any help


5 Comments   [ + ] Show comments
  • What does a verbose MSI installation log tell you?
    What property did you set to 0?
    How are you setting the path you require? - EdT 9 years ago
    • I'm setting STATIC property to 0. Although I should not have to do this, since normally if left unspecified it should install a non static version (so in C:\Program Files\Java\jre8) Like all previous version of java 7 and 6 did.

      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 9 years ago
  • Are you testing on a clean machine with no other JRE installs present? If not, try that, as I don't see anything fundamentally wrong with what you are doing. Have you tried running the EXE installer with direct command line arguments such as /s STATIC=0
    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 9 years ago
    • Yes, clean vanilla Win7 x86. I have tried using the exe instead, with the exact command line you mentionned (/s STATIC=0) I get the same result.

      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 9 years ago
  • I note you have not made any reference to examining a verbose log of the install. I would compare verbose logs with STATIC=0 and STATIC=1 to see whether they are essentially the same or whether there are any differences in any key property values. Might also be worth checking the MSI tables for any entries containing STATIC - especially conditions in the CustomAction table and the component table. Finally, I just recalled reading about an issue with this version of Java relating to virtualisation with SWV. The link is here:
    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 9 years ago
  • Has this been figured out? I'm running into what I believe is the same issue when trying to deploy Java 8 Update 31. My package installs the x64 and x86 versions, but installs them side by side with Java 8 Update 25. In the past it would simply update the version. Thanks! - JUTN 9 years ago
    • I haven't found an authoritative answer to this but it seems to be subtly mentioned here as:

      "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
      • I was able to get my situation resolved. I didn't fully comprehend the install path change that Oracle recently implemented. Now that I am using the INSTALLDIR switch the installs update like they have in the past.

        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
  • The issue isn't just the install path being static or not. It is simply the fact that updates are not removing old versions! Yes you can uninstall them we know that but my gramma doesn't do that and so it will be Thanksgiving before I can come to unload all her old versions of vulnerable JRE now!! UgH! - worzie 9 years ago

Answers (4)

Posted by: twisted_fool 9 years ago
White Belt
1

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

Posted by: cogx 9 years ago
White Belt
1
Yes, this is very annoying, but it appears Oracle did it on purpose starting in JRE 8u20:

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
Posted by: DKur 9 years ago
White Belt
1
Hi,

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 9 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
Posted by: Ladewig 8 years ago
White Belt
0

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.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ