Art is Art and Water is Water

July 17, 2015

Silent installation of JDK 8 on windows

Filed under: Uncategorized — foone @ 6:39 pm

This doesn’t appear to be documented or posted anywhere I could find with google, but this is the insane syntax you need:

jdk-8u51-windows-x64.exe /s ADDLOCAL=”ToolsFeature,PublicjreFeature” /INSTALLDIRPUBJRE=”C:\java\jre” /L “C:\java.txt” INSTALLDIR=C:\java\jdk

INSTALLDIR existed in Java 6/7 but had a slash before it. For some reason in JDK 8, you must do it slashless.

(If you wonder “Why install the JRE/JDK to C:\Java instead of C:\Program Files”, the answer is because You’re Running Jenkins and vcvarsall.bat hates you)

(Also: If you want to wait while the JDK installs, do “start /wait jdk.exe ..”. but if you’re in cygwin you can’t, because start isn’t a program, it’s a command inside cmd.exe, so do “cmd.exe /c start /wait jdk.exe …”)

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: