Inward_Spiral
asked on
How do I silently install Java's SDK and the JRE?
Hello all,
I'm trying to package up both Apache Tomcat and the JDK, along with my own web app into an installer package, so I can simplify deployment.
During the process, I execute 'j2sdk-1_4_2_08-windows-i5 86-p.exe "/s /v"/qn JAVAUPDATE=0"', to install the JDK silently. The JDK gets installed, but not the java runtime, so when Apache Tomcat is installed, it doesn't find the version of java to use, and won't start up.
But if I manually install j2sdk-1_4_2_08-windows-i58 6-p.exe, both the JDK and JRE are installed. After that, I can install Tomcat, it picks up on the Java version, and runs fine.
So, any ideas as to what I'm missing? How can I silently install all the java components that Tomcat needs to run?
Any thoughts would be appreciated, I'm a little stuck on this one.
Thanks!
I'm trying to package up both Apache Tomcat and the JDK, along with my own web app into an installer package, so I can simplify deployment.
During the process, I execute 'j2sdk-1_4_2_08-windows-i5
But if I manually install j2sdk-1_4_2_08-windows-i58
So, any ideas as to what I'm missing? How can I silently install all the java components that Tomcat needs to run?
Any thoughts would be appreciated, I'm a little stuck on this one.
Thanks!
The JDK also contains a JRE. Set your JAVA_HOME environment variable to point to the root installation folder of JDK. %JAVA_HOME%\jre contains the JRE.
ASKER
I'm setting both CATALINA_HOME and JAVA_HOME with VBScript during the install:
Set args=wscript.arguments
Set oShell = CreateObject("WScript.Shel l")
Set oWshSystemEnv = oShell.Environment("SYSTEM ")
oWshSystemEnv("CATALINA_HO ME") = args(0)
oWshSystemEnv("JAVA_HOME") = args(1)
I've checked the registry, if I install Tomcat silently after a manual install of the JDK, I see a "Jvm" registry entry in "HKEY_LOCAL_MACHINE\SOFTWA RE\Apache Software Foundation\Procrun 2.0\Tomcat5\Parameters\Jav a".
But if I silently install both of them, the "Jvm" entry isn't there, and the Tomcat service won't start up.
Messing with registry entries isn't always a good thing, anyone have a suggestion on how to get past this without registry hacks?
Set args=wscript.arguments
Set oShell = CreateObject("WScript.Shel
Set oWshSystemEnv = oShell.Environment("SYSTEM
oWshSystemEnv("CATALINA_HO
oWshSystemEnv("JAVA_HOME")
I've checked the registry, if I install Tomcat silently after a manual install of the JDK, I see a "Jvm" registry entry in "HKEY_LOCAL_MACHINE\SOFTWA
But if I silently install both of them, the "Jvm" entry isn't there, and the Tomcat service won't start up.
Messing with registry entries isn't always a good thing, anyone have a suggestion on how to get past this without registry hacks?
Then it perhaps needs that entry to be present - otherwise maybe you can specify it as a parameter to Tomcat while starting up as an extra command-line argument.
make sure you make the registry entry for java when you are installing java in silent mode.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry for the delay, phuocnh's solution worked for my initial test, but I got pulled onto another project before I could add everything I wanted to the package.
I swear, if I had a dollar for every time that happened...
I swear, if I had a dollar for every time that happened...