tags:

views:

2025

answers:

3

I have an third-party applet that requires JRE v1.5_12 to work correctly. THe user is installing JRE v1.6.07 or better. It used to be with 1.5 and below, that I could have multiple JRE's on the machine and specify which one to use - but with 1.6 that apepars to be broken. How do I tell the browser I want to use v1.5_12 instead of the latest one installed?

+9  A: 

For security reasons, you can no longer force it to use older JRE's. Say release 12 has a huge security hole, and everyone installs release 13 to patch it. Evil java applets could just say "run with release 12 please" and then carry out their exploits, rendering the patches useless.

Most likely you have some code with security holes that the newer JRE is blocking, because it would cause a security risk. Fix your code, should be pretty minor changes, then you wont have to worry.

See this page for more info on the change.

davr
A: 

I guess the questioner is asking how the application code itself can choose the required JRE. It is NOT allowed for the same reasons as "Davr" gave.

anjanb
A: 

The new applet engine (that will be shipped with 1.6u10 when Sun gets around to officially shipping it) gives you a tremendous amount of control in this area. It's going to take awhile to get enough systems on 6u10 to where you can actually rely on the functionality (unless you are corporate) - but it is coming (seems like it's about 5 years too late).

Here's a JavaWorld article describing this at a very high level: article text

6u10 also has a deployment toolkit that provides super easy to use javascript snippets that you can include in your applet deployment pages. These snippets handle JRE version checking, user notification, JRE downloading on demand, and a number of other things that are otherwise a hassle (not impossible, just a pain). The deployment kit has been designed to fail gracefully, so it does amazing things if 6u10 or above is installed, and drops back to decent behavior for older JREs.

One really, really nice thing about the new applet engine is that it runs in a separate process space from the browser. This has a couple of very big advantages, including the ability to have multiple applets running in different versions of the JRE (yes, you can specify different required JREs, including restrictions on how old and how new of JRE you support - the applet engine will re-use JREs if it can, but it has the ability to start up a different one if it needs).

Kevin Day