title: How to silently install Java JDK into a specific directory on windows
body: <p>On my development machine I always have to install Java 6 <em>and</em> Java 7 and I have to install each JDK in both, the 32 and 64 bit version, for testing purposes. Since the frequency of Java updates seems to be getting more and more ridiculous (twice per week by now?) each update requires me to un- and then re-install <em>4</em> JDKs. So this is getting really quite annoying and I would thus like to script this entire process. </p>
  
  <p>My problem is, that by default each JDK versions installs into a directory-path that contains the update-number (default: "C:\Program Files\Java\jdk1.6.0_&lt;update-nr&gt;\"). To spare me from having to adapt tons of build-scripts I always manually strip the trailing "_&lt;update-nr&gt;" from the installation path and always install into the same "C:\Program Files\Java\jdk1.6.0" or "C:\Program Files\Java\jdk1.7.0", resp., for the 64-bit versions and into C:\Program Files (x86)\Java\jdk1.6.0" or "C:\Program Files (x86)\Java\jdk1.7.0", resp., for the 32-bit versions.</p>
  
  <p>While I found out, how to specify the installation directory for a JRE installer (i.e. the Java runtime):</p>
  
  <pre><code>&lt;jre-installfile&gt;.exe [/s] [INSTALLDIR=&lt;drive&gt;:\&lt;JRE_install_path&gt;] 
      [STATIC=1] [WEB_JAVA=0/1] [WEB_JAVA_SECURITY_LEVEL=VH/H/M/L]
  </code></pre>
  
  <p>I did not yet find a similar description how to specify the installation directory for the JDK installer. </p>
  
  <p>Does anyone know if and how one can specify the install path for the JDK installer, so that one can direct a silent JDK installation into a specific installation directory?</p>