Here are instructions on how to quickly and simply capture any newer versions of Java Runtime (1.4 and higher) for testing and working on within a ThinApp packaged application. These instructions will work whether Java is captured by itself or can be incorporated as a part of a larger multi-application installation.
For capturing Java 1.3 and lower packages…see the blog entry Step by Step instructions on How to ThinApp JAVA Runtime Version 1.3.1.20.
Requirements
- A clean built VM with no other installations (see 'What do you mean by a "Clean PC"?').
- Familiarization with instructions on how to virtualize a software product via ThinApp (see, "How to Make a ThinApp Application").
- Your version of the JRE setup (see http://www.java.com – specifically the "All Java Downloads" section)
Instructions on How to ThinApp JAVA Runtime
These are the basic instruction you will need on How to ThinApp newer Java Runtimes.
1. Start with a clean Windows XP image only containing ThinApp Setup Capture
2. Launch ThinApp Setup Capture and create a pre-installation snapshot
3. Launch the Java Installation/Setup
NOTE: Select ALL OPTIONS to be installed (DO NOT USE INSTALL LATER/INSTALL ON FIRST USE)!
NOTE: At this point, you may wish to open INETCPL.CPL from the RUN window, browse to the PROGRAMS tab, and then MANAGE ADD-ONS and disable the JQSIEStartDetectorImpl Class and, if seen, the SSV Helper Class Browser Helper Objects. If you don't see the SSV Helper Class, it is sometimes listed as Java(tm) Plugin 2 SSV Helper Class. If this is found, disable this to prevent "Run As" popups in Win 7, Vista, and Win 2008 systems.
4. Run the post-installation snapshot in ThinApp Setup Capture.
5. Deselect all pre-checked Entry Points and select IEXPLORE as the entry point (NOTE: Will need to check SHOW ENTRY POINTS USED FOR DEBUGGING option.
6. For the Primary Data Container, type in JAVA.DAT or type in a Primary Data Container that suites you (see above image).
7. Continue through the Setup Capture wizard, setting your desired settings. Stop and set Default File System Isolation to WRITECOPY (see below image).
8. Modify the Package.INI file by clicking the Edit Package.ini button.
a. Edit the IEXPLORE.EXE Entry Point found at the bottom of the Package.INI file and add the following CommandLine option and value (bolded below).
[iexplore.exe]
Source=%ProgramFilesDir%\Internet Explorer\iexplore.exe
Shortcut=JAVA.DAT
CommandLine=%ProgramFilesDir%\Internet Explorer\iexplore.exe "http://www.javatester.org"
b. Close and save the PACKAGE.INI mods.
10. Open the project folder (click "Open Project Folder" button)
a. Edit the text file HKEY_LOCAL_MACHINE.txt and add this key isolation at the top of the file.
isolation_full HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects
b. Edit the text file HKEY_LOCAL_MACHINE.txt and remove the RUN key and any registry entries beneath it (such as SunJavaUpdateSched and it's pertaining value).
isolation_full HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
c. Close and Save the text file HKEY_LOCAL_MACHINE.txt.
d. Edit the text file HKEY_CURRENT_USER.txt and add this key isolation at the top of the file
isolation_full HKEY_CURRENT_USER\Software\Classes\CLSID
e. Close and Save the text file HKEY_CURRENT_USER.txt.
f. Clean up the project by removing the following folders: NOTE: Make a backup first!
%Cookies%
%History%
%Internet Cache%
%SystemRoot%\Installer
%AppData%\Sun
%Program Files Common%\Java
g. Close the Project Folder
11. Click the Build button.
12. Once the Build process is completed, click the Finish button.
13. Copy out to a system where a different version of Java is already installed (ensure the JAVA.DAT file is next to IEXPLORE.EXE!).
14. Launch the Internet Explorer entry point and visit http://www.javatester.org/version.html to verify correct JRE version is seen by Internet Explorer.
Great, now if I could only run it on Windows 7, that would be nice.
๐ It’s likely you can do so now with ThinApp 4.0.4.
See http://blogs.vmware.com/thinapp/2009/12/top-10-questions-on-thinapp.html
Has someone tred this with 1.6.20? I am having a hard time getting it to work.
@John-
I went back and tested Java 1.6.20 and it’s pretty much the same as 1.6.17. They both package up just fine.
There are, however, some suggested tweaks. After JAVA is installed I would suggest doing the following PRIOR to doing the ThinApp Post-Install Setup Capture.
1. In SERVICES.MSC, stop the JAVA Update Service (I probably don’t have the name quite correct but essentially that is the service you won’t need running within your ThinApp’ed Java).
2. Open the Internet Control Panel Applet (INETCPL.CPL from the RUN line) and disable the following:
2.a. JAVA(tm) PLUG-IN 2 SSV HELPER
2.b. JQSIESTARTDETECTORIMPL CLASS
3. Test this doesn’t disable your Java functionality for your app.
Now do your post install setup capture. Disabling the two Browser Helper Objects in Step 2. above also “should” kill off the UAC prompts on Vista and Win 7 as well. If not, clean the sandbox on a Win 7 system and run this as an administrator so the prompts can be set to ignore…then once it fires up without UAC every time, SBMERGE the sandbox to a copy of the project and rebuild and retest.
Hope this helps!