We all know that the standard Java Runtime Environment is bundled with the executable for Java Development Kit. I mean, it would be CRAZY to have the means to develop Java applications but not be able to actually run any simple web apps, right?
Well, in doing a silent MSI deployment of JDK 1.6 (both Update 2 and then later Update 3), I could not for the LIFE of me get the included JRE to install. Even worse yet was the fact that there were no error messages or any other kinds of warnings that JRE fell by the wayside. That is, not until somebody needed to use some Java-driven web applications and both IE and FireFox reported that Java was MIA.
I tried ripping open JDK's MSI with Orca, but there were no properties for IEXPLORE or MOZILLA like there are in JRE's MSI. I then tried a couple different tools to create a transforms file, but THAT didn't work because of the nature of JDK's installer. When doing a manual installation from the executable you would get to the last dialog for JDK, then JDK would install. Once JDK was done, THEN you would get to the prompt for the "advanced" settings; this is the point where the JRE installation runs. When doing it this way (manually), JRE installs by default and with the IE and FF plug-ins enabled, and everybody rejoices. But when trying to capture the dialog responses for the transforms file, the packagers I used both "concluded" after the last dialog for the JDK portion of the installation. They apparently didn't recognize that there were more options down the road after JDK itself installs, and so there was no way to have the transforms file include anything about the JRE portion of the installation.
Bottom line: I ended up having to download and launch the JRE MSI separately (see the other entries about JRE in the Package KB for details on how to extract and/or modify its MSI) in addition to the JDK package. So far it works great; I push them out separately, they are completely independent from one another and there are no consequences with pushing out one before the other.
If anybody happens to know of a way to do a silent push of JDK's MSI to include the JRE then I'd love to hear it and be able to kill two birds with one stone. Otherwise, I hope the information above is able to spare somebody else the same headache I went through.
Just to save people time the installer extracts its JDK msi to
c:\documents and settings\username\application data\sun\java
The JRE is extracted to local settings temp
You can perform a silent JDK installation by using the command-line arguments. The following arguments install JDK silently and provide an option of installing public JRE and JavaDB.
JDK installs public jre and javadb in the silent mode.
Use the command jdk.exe /s
JDK does not install public jre, but installs javadb in the silent mode.
Use the command jdk.exe /s ADDLOCAL="ToolsFeature,DemosFeature,SourceFeature,JavaDBFeature"
JDK does not install javadb, but installs public jre in the silent mode.
Use the command jdk.exe /s ADDLOCAL="ToolsFeature,DemosFeature,SourceFeature,PublicjreFeature"
JDK does not install either javadb or public jre in the silent mode.
Use the command jdk.exe /s ADDLOCAL="ToolsFeature,DemosFeature,SourceFeature"
Install public jre and javadb to the specified directories.
Use the command jdk.exe /s /INSTALLDIRPUBJRE=c:\test\ /INSTALLDIRJAVADB=c:\testdb
Note - Some of the arguments work only with 6u15 and higher releases.
We deploy the corresponding JRE first, then the JDK. The following is just an excerpt from the script and won't work in isolation but should give you an idea.
if not exist "%ProgramFiles%\Java\jre1.6.0_07\bin\java.exe" goto JREINSTALL
goto JDKINSTALL
:JREINSTALL
set APPMSI=JRE160Update7
set MSITXT=Sun Java Runtime Environment 1.6.0 Update 7
In the msi the publicjre and javadb are executed in the InstallUISequence. This sequence is only run in Full and Reduced UI modes which is why these features do not install with the /qb and /qn command switches.
Using the following steps & command will allow all features to install unattended.
Open the msi in orca or any other msi editor. Open the CustomAction table and change the commandline stored in the "installpublicjre" to
ADDLOCAL isn't required, if it's not specified the installer installs all features.
IE & MOZILLA have been deprecated.
STATIC=1 stops other version installers from updating or uninstalling this version. (Exclude if you don't need multiple versions of java installed).
It's not completely silent but at least it will install the java jdk with all features unattended.
Answering Jeemo
U can (with Orca) Apply Changes to the JRe Installation.
Open MSI : And find the JREinstall Paramters
I Changed them to
msiexec.exe /i "[INSTALLDIR]\jre.msi" ADDLOCAL=ALL SDKSILENT=1 IEXPLORER=1 MOZILLA=1 WEBSTARTICON=0 JAVAUPDATE=0 SYSTRAY=0 REBOOT=Suppress
Also u can get rid of the [DEFAULTBROWSER] Popup and Change the Paths (i.e. of the DB Folder)
But as Seen @ Notes :
The unpacked MSI + CABS can ONLY install jdk and no other Features!
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