How do I use SVS with multiple versions of Java?
Q:
Gint wrote, "we have a couple of Cisco Java apps that conflict; they require different Java versions. I installed not understanding how exactly to do this. A web page on the Cisco site has Ver X and Ver. Y. Do I need to uninstall Internet Explorer and make 2 versions with separate X and Y plug-ins? Then users need to Trinket to one or the other based on what page they will hit?"
A:
Hi, Gint. Since SVS virtualizes application resources (files and regkeys), different versions for Java Runtime Environment (JRE) can coexist at the same time on the same machine. The JRE for version 1.5.0.06 is posted on the public SVSDownloads page and is a good example of how to do this:
Java Runtime Environment (JRE) 1.5.0.06
Java software allows you to run applications called "applets" that are written in the Java programming language. These applets allow you to play online games, calculate your mortgage interest, view images in 3D, and more.
Download
Size: 53.4MB
Home Page
Please download this version of the JRE to see how this was done. Then you can capture the other version of JRE that you need in a similar manner.
Here are some steps that might help:
- Find a new computer that does not have the JRE installed yet. Use this machine for your SVS capture.
- Install SVS agent and SVS Administrator.
- Download, but do not install the JRE, to the desktop of the capture machine.
- Enter the Create New Layer—Single program capture mode and 'capture' the JRE.
- When done, verify that this works with your application X.
- Deactivate JRE.
- Repeat Steps 1-5 with alternate JRE version and application Y.
Now, just activating both Java layers at the same time won't be enough. You need to do something explicit to guarantee that each app sees the correct Java layer.
The problem is similar to the issue discussed here: http://juice.altiris.com/node/548. You need to launch the apps in such a way that they are tracked by SVS as being part of the correct Java layer. There are two ways to do this:
- One is by using the WiseScript tool referenced in that article. Put the launcher script and all of the icons for apps that need Java X in the Java X layer. Put the launcher script and all of the icons for apps that need Java Y in the Java Y layer. Limitation: This only works for apps in the base. (If the shortcut launches an app that's in an Application Layer, SVS will start tracking a new process tree.) So it's great for Web-based apps where what you're doing is calling iexplore.exe with a URL.
- The other is by using the EXEC option of SVSCMD. Using shortcuts that reside anywhere, launch the app with SVSCMD EXEC so that it is tracked by SVS as running from the appropriate Java layer. This works for everything.
A note from Altiris Product Management:For the future, we've mulled over having a configurable search order for each application layer. But I think that would be useful only for the ultra power user who's just managing their own machine; it would be difficult to centrally manage. Let us know what you think.
- Login or register to post comments
- 5903 reads
- Printer-friendly version






Some additional hints
The pointers above won't be enough if you want to run Java 1.5.0_06 and Java 1.4 concurrently (this goes for web applets run from Internet Explorer on Windows 2000/XP at least).
Java 1.5 (I'm not sure about the exact sub-version, but 1.5.0_06 has it, 1.5.0_02 not) implements a Browser Helper Object ({761497BB-D6F0-462C-B6EB-D4DAF1D92D43}) for IE. When running an applet with Java 1.5 for the first time, this version of Java registers as a handler for all previous versions starting with 1.3 by writing the approriate keys to HKCU\SOFTWARE\Classes\CLSID. Since class entries in HKCU override those in HKCR, from now on every applet is started with Java 1.5, no matter what you do.
So, to make sure the correct version is loaded, you need to delete the key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Broswer Helper Objects\{761497BB-D6F0-462C-B6EB-D4DAF1D92D43} in your Java 1.5 package.
Additionally from my tests I'd recommend implementing a layer for each web application you want to run with a specific version of Java, containing
1) a registry key with the version of java you want to run (HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment,
"CurrentVersion"="1.x")
2) a link to a batch file adjusting the layer priorities for all versions of Java so that the priority of the wanted version of Java is higher than that of any other version, but still lower than that of the one containing the link and then starting the IE with the web page you want to access (iexplore.exe -new http://some.page.net)