13 Replies Latest reply on Jul 9, 2010 8:45 AM by Steven Bell

    Java JDK Software Installation

      Hello,

      I'm trying to create a software package to install Java JDK (6u20).  I'm choosing custom software type and uploaded a directory containing both the Java installer executable (which I believe is a repackaged MSI) and a batch file.  The batch file is what is being executed in the uploaded folder.  The issue is that the Java installer does not complete or start successfully.  It creates a "Sun\Java\YourJavaInstall\ directory structure with an MSI and a cab file in it, which look like they were stripped out of the Java executable.

       

      Here are the commands being run in the custom software installation package.  This command works when run as a user logged on locally.


      cd "??SOURCE??"
      start /w jdk-6u20-windows-x64.exe /s INSTALLDIR="%systemdrive%\java\jdk-6u20-windows-x64" REBOOT=Suppress

       

      This command works when run as a user logged on locally.  However, when run from BL, it just hangs and creates a new SUN\Java directory.

       

      Any help would be greatly appreciated.

        • 1. Re: Java JDK Software Installation

          the "start /w" command implies that you're launching a cmd.exe window which needs to be open & present until the install is complete. since you're deploying this via BL, you don't have a UI to open a cmd.exe window in, hence the hang.

          • 2. Re: Java JDK Software Installation

            Hi Dan, unfortunately i'm not entirely sure your statement is correct.

             

            With or without the 'start /w' the following things are true:

            • The installation hangs
            • The following processes are running and not doing anything
              • bldeploy.exe
              • bltargetjobmanager.exe
              • msiexec.exe
              • conhost.exe
              • cmd.exe
              • msiexec.exe (two of them)
              • jdk-6u20-windows-x64.exe
            • A new directory structure is created Sun\Java\jdk1.6.0_20_x64\
              • jdk1.6.0_20.msi and sd160200.cab are extracted to this location

             

            When not executed via BL, the installation proceeds quickly and no Sun directory is created.  Still stumped.

            • 3. Re: Java JDK Software Installation
              Bill Robinson

              are you sure the installer is not expecting any input?  what you describe sounds like it's waiting for some input.   can you increase the logging of the installer and see if that provides anything useful?

              • 4. Re: Java JDK Software Installation

                Hi Bill, good question.  I've put in here some of the BL job and the installer's setup log

                 

                BL Logs

                Processing asset BLPACKAGE
                Processing asset CUSTOMSOFTWARE
                Executing command: "cd "2079688.1\jdk-6u20-windows-x64" jdk-6u20-windows-x64.exe /s INSTALLDIR="%systemdrive%\java\jdk-6u20-windows-x64" REBOOT=Suppress"
                " [stdout: 1]    C:\temp\stage\f543405648613045bb0c76d955380ea5>chcp 1252  1>NUL     C:\temp\stage\f543405648613045bb0c76d955380ea5>cd ""2079688.1\jdk-6u20-windows-x64""     C:\temp\stage\f543405648613045bb0c76d955380ea5\2079688.1\jdk-6u20-windows-x64>jdk-6u20-windows-x64.exe /s INSTALLDIR=""C:\java\jdk-6u20-windows-x64"" REBOOT=Suppress   "

                 

                After this it's a deploy failed

                 

                Setup Log

                MSI (s) (2C:6C) [09:35:09:402]: Product: Java(TM) SE Development Kit 6 Update 20 (64-bit) -- Error 1316.A network error occurred while attempting to read from the file C:\Sun\Java\jdk1.6.0_20_x64\jdk1.6.0_20.msi

                Error 1316.A network error occurred while attempting to read from the file C:\Sun\Java\jdk1.6.0_20_x64\jdk1.6.0_20.msi
                Action ended 9:35:09: ProcessComponents. Return value 3.
                Action ended 9:35:09: INSTALL. Return value 3.
                MSI (s) (2C:6C) [09:35:09:480]: Windows Installer installed the product. Product Name: Java(TM) SE Development Kit 6 Update 20 (64-bit). Product Version: 1.6.0.200. Product Language: 1033. Manufacturer: Sun Microsystems, Inc.. Installation success or error status: 1603.

                 

                I'm up for any other way or method to get Java JDK installed via BL, but I just can't figure out why this method is not working.

                • 5. Re: Java JDK Software Installation
                  Bill Robinson

                  Maybe try putting a:

                   

                  Cmd /c "start /w ...."

                   

                  Around the installer command ?

                  • 6. Re: Java JDK Software Installation

                    Hi Bill,

                    Yeah I tried adding the cmd /c as well to the command earlier to no avail.  I tried it with and without the start /w.  Upon further investigation, I had pulled the setup.log from the Java installer a bit too soon.  It does in fact display an error and this is the error.  I'll update my previous post as well with this data.

                     

                    The Java installer is a container for the Java msi file that ultimately gets executed.  In my case, what I see is that the Java installer is executing, unpacking the msi, and then can't execute the msi.  Ironically, I don't see the extraction at all if executing as myself, but this may be because it's happening so quickly and because it's likely going to my temp directory for my user profile.

                     

                    MSI (s) (2C:6C) [09:35:09:402]: Product: Java(TM) SE Development Kit 6 Update 20 (64-bit) -- Error 1316.A network error occurred while attempting to read from the file C:\Sun\Java\jdk1.6.0_20_x64\jdk1.6.0_20.msi

                    Error 1316.A network error occurred while attempting to read from the file C:\Sun\Java\jdk1.6.0_20_x64\jdk1.6.0_20.msi
                    Action ended 9:35:09: ProcessComponents. Return value 3.
                    Action ended 9:35:09: INSTALL. Return value 3.
                    MSI (s) (2C:6C) [09:35:09:480]: Windows Installer installed the product. Product Name: Java(TM) SE Development Kit 6 Update 20 (64-bit). Product Version: 1.6.0.200. Product Language: 1033. Manufacturer: Sun Microsystems, Inc.. Installation success or error status: 1603.

                    • 7. Re: Java JDK Software Installation

                      OK, so for one reason or another that I haven't yet discovered, the JDK install won't work with BL as it is. Once you grab the offline installer, you can do a silent install manually, but something about it requires a UI and a valid user session to actually work.

                       

                      So, here's the workaround that I was able to employ in a test environment:

                       

                      1. Download the full JDK offline installer
                      2. Manually run the installer on a test machine
                      3. Without actually installing the JDK, copy off the extracted.msi and .cab files to a backup location
                        1. On my test server (2k8 R2) the path these files were generated at was: C:\Users\Administrator\AppData\LocalLow\Sun\Java\jdk1.6.0_21_x64
                        2. The pathing used may vary depending on the Windows variant being used (eg: 2003 vs 2008)
                        3. You should see the following files extracted:
                            • jdk1.6.0_21.msi
                            • sb160210.cab
                            • sd160210.cab
                            • sj160210.cab
                            • sp160210.cab
                            • sr160210.cab
                            • ss160210.cab
                            • st160210.cab
                            • sz160210.cab
                      4. In the CM, create a new BLPackage pointing to the set of .cab files and the .msi installer you copied off
                      5. Change the file pathing in the BLPackage to the appropriate location for your deployment needs...
                      6. Add three new external commands (my deploy path was c:\tmp):
                        1. c:\tmp\jdk1.6.0_21.msi /qn INSTALLDIR=%systemdrive%\java\jdk-6u21-windows-x64 ADDLOCAL=ALL REBOOT=Suppress
                        2. del c:\tmp\*.msi
                        3. del c:\tmp\*.cab
                      7. Deploy and adjust as needed

                       

                       

                      While a pain, this method does work with BL.

                      1 of 1 people found this helpful
                      • 8. Re: Java JDK Software Installation

                        Nice job on the workaround Dan.  I was going to do the same approach, but when utilizing that method it will only install the JDK, not the JRE that accompanies it.  For example, the list of installed applications will be:

                         

                        • Java(TM) SE Development Kit 6 Update 21 (64-bit)

                        as opposed to:

                        • Java(TM) 6 Update 21 (64-bit)
                        • Java(TM) SE Development Kit 6 Update 21 (64-bit)

                         

                        Again, both the JRE and JDK are installed silently when installing as a user logged in in an interactive session.  I'm not sure what the issue is if the JRE doesn't get installed with the JDK or if the JRE version bundled with the JDK is different in some way and our developers require it.  Additionally, JRE installed by itself experiences the same issue.

                         

                        I'm not sure where the issue is.  If it's with the Java installer or with BL, but either way, it doesn't work as expected and it makes installing the JDK a pain.

                        • 9. Re: Java JDK Software Installation

                          Is this a problem with the 64-bit installer because I successfully installed the jdk on a Windows 2003 server with the following command:

                           

                          "??SOURCE??" /s /v /qn "INSTALLDIR=??TARGET.JAVA_INSTALL_DIR??"

                           

                          "??SOURCE??" = jdk-6u21-windows-i586.exe

                           

                          ScreenHunter_02 Jul. 08 22.21.gif

                          • 10. Re: Java JDK Software Installation

                            Hi jrellme,

                            I haven't figured out how or why, but using the commands you have there still do not produce good results for me.  I'm not sure if it's because of the system I'm working on is a Windows Server 2008 R2 server.  Do you have any Server 2008 R2 servers that you can test a 64bit install on via BL?

                            • 11. Re: Java JDK Software Installation

                              i can also confirm that the jdk install when executed manually for a silent insall does install both on 2k8r2 using the x64 jdk installer... going to take another quick look at something...I'll get a new post up here if I get an update.

                              • 12. Re: Java JDK Software Installation

                                Employing similar steps as I noted above, here are the appropriate external commands I used in a BLPackage to achieve this:

                                 

                                1. start /w c:\tmp\jdk1.6.0_21.msi /qn INSTALLDIR=%systemdrive%\java\jdk-6u21-windows-x64 REBOOT=Suppress
                                2. start /w %systemdrive%\java\jdk-6u21-windows-x64\jre.msi /qn INSTALLDIR="%systemdrive%\java\jre-6u21-windows-x64" REBOOT=Suppress
                                3. ping -n 15 127.0.0.1 > nul
                                  del /f /q c:\tmp
                                  rmdir c:\tmp

                                 

                                The resulting JRE that is called in step 2 is then listed in the add/remove programs dialog, but is the same JRE that's laid down by the JDK installer (aka: not the public JDK). So you have two copies of the JDK specific JRE located at:

                                 

                                1. C:\java\jdk-6u21-windows-x64\jre
                                2. C:\java\jre-6u21-windows-x64

                                 

                                Not sure if this helps you or not...

                                • 13. Re: Java JDK Software Installation

                                  Hi Dan,

                                  These steps will work.  I find it dissapointing that we have to perform all these steps just to get it installed.  Considering the amount of Java updates that get pushed out, I'm not a big fan of their installer at the moment.

                                   

                                  It's not the best but it'll have to work.