0

I'm trying to install the same Oracle JDK version on a Windows machine in two different paths, so I tried:

> jdk-8uxy-windows-x64.exe ADDLOCAL="ToolsFeature" INSTALLDIR=C:\jdk-path1 INSTALL_SILENT=1 STATIC=1 AUTO_UPDATE=0 NOSTARTMENU=1 REMOVEOUTOFDATEJRES=0

> jdk-8uxy-windows-x64.exe ADDLOCAL="ToolsFeature" INSTALLDIR=C:\jdk-path2 INSTALL_SILENT=1 STATIC=1 AUTO_UPDATE=0 NOSTARTMENU=1 REMOVEOUTOFDATEJRES=0

But it seems that the second installation removes the previous installation. Any idea why this happen and how to workaround it?

Thanks!

Andrea Scarpino
  • 791
  • 6
  • 13
  • May I ask what's the reason doing that? – nyyrikki Apr 20 '16 at 08:34
  • Different Wildfly application servers pointing to different JDK installations that at time 0 are the same, but then they could be updated following different versions. – Andrea Scarpino Apr 20 '16 at 08:37
  • Maybe you should try to use virtual machines. – Mikhail Kuchma Apr 20 '16 at 08:45
  • 1
    After some time spent on Windows I've found out that JDK installator added java symlink to *system32* directory. That was annoying when I needed to switch JDK's. My solution was to download jdk-zips and extract them into the location I wanted. Then of course `PATH` env var needed to be set correctly. I actually created variables like: `JAVA_HOME, JAVA_7, JAVA_8` and switched between them on demand. What's more I'm still using this approach on linux. There's no jdk zip for Windows, but there are solutions to that http://stackoverflow.com/questions/930265/installing-java-manually-on-windows – gmaslowski Apr 20 '16 at 08:49

1 Answers1

0

So another option is to skip the installer and simply extract the jdk-8uxy-windows-x64.exe using 7-Zip. Then extract again the tools.zip archive to jdk-path1 and jdk-path2.

Andrea Scarpino
  • 791
  • 6
  • 13