Require both 1.2 and 1.3 jre to run applets

We use a mission-critical third-party (applet) product that works on the 1.2 jre, but it does not run under jre 1.3. Our latest in-house apps, and other third party products, use jre 1.3. Not being able to deploy our new apps on the same workstations as the 1.2 application, is a major inconvenience. The 1.2 vendor does not seem interested in upgrading to 1.3, and we have no access to the source code.

The object tag for the 1.2 applet does specify 1.2, but after we install jre 1.3 on a workstation, co-existing with the 1.2 install, the 1.2 app's gui fails to paint correctly. We presume that the applet is linking to the 1.3 library, with which it is incompatible in some way.

Is there a way for the plugin to let the Object tag drive selection of the jre that runs an applet, so that legacy applets can still function as we move into later versions of the jre. Our workstation environment is nT4 sp6, IE5.5

[939 byte] By [bwinspur] at [2007-9-26 3:31:44]
# 1

Hi Bwinspur,

Starting with 1.4 JRE, there is multi-version support in

Java Plugin. This means multiple versions of the JRE may be deployed in the same environment and Java Plug-in can select the version it wants; for more details, refer the url:

http://java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/version.html

So, currently there is no supported way to achieve your

requirement. You might want to consider going forward

to JRE 1.4.

Hope this helps.

Sun-DTS

jdcusr1 at 2007-6-29 11:58:33 > top of Java-index,Desktop,Deploying...
# 2

Below is an Unsupported way of runnning diff jre's:-

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The Java Plugin (JPI) is now integrated with the JRE (since

JDK1.3) and it only works well with the same JRE. There is no

supported in using an alternate JRE with the Java Plugin. The main

reason is that the plugin makes use of sun.* classes, which are not

guaranteed to remain the same from JRE to JRE.

The current policy is: JPI v1.x.y should work with any update release

of 1.x.y. However, we don't assure the backward compatibilities of

older JRE.

With this being made clear there might an UNSUPPORTED workaround that

developers can try to support both JDK1.3 and 1.2.2 Applets using

JRE1.3.0_02. Some minor configuration changes are needed when executing

JDK1.2.2 Applets then 1.3 Applets and vice versa.

First install JRE1.2.2_00x followed by JRE1.3_0x on your client

systems.

To run JDK1.2.2 Applets with JPI1.3 launch the JPI 1.3 Control Panel.

The JRE of choice under the Advance tab should read : JRE1.2 in

"c:\Program Files\JavaSoft\JRE1.2" and under the Basic tab add to the

Java Run Time Parameters field the "-classic" option or you will get

the following error message:

"The Java Runtime Environment cannot be loaded from

<D:\PROGRA~1\JavaSoft\JRE\1.2\bin\hotspot\jvm.dll>"

because JPI1.3 no longer knows about the classic directory by default.

The file with the following filename format includes details of which

Java runtime and jre runtime parameters to use.

<user_dir>\.java\properties130_02 (e.g

c:\WINNT\profile\<user_login>\.java\properties130_02)

You can customize this file for the different users who are using JDK

1.2.2 Applets as oppose to 1.3 Applets. Developers can create two

properties files and the users will need to switch in the appropriate

properties into properties130_02 to invoke the desired JRE. A simple

.bat file can be created on Windows to simplify this process for the

users.

Note: Developers should fully test their applets in this environment to

understand what strange behaviors to expect. From our testing the java

console does not display itself when using jre1.2.2 with JPI1.3 but

with the JRE1.3 as the chosen runtime everything seems to work.

Another approach:

On NT, the plugin binaries (NPJava*.dll) are installed under a directory as

follows:

C:\Program Files\Netscape\Communicator\Program\Plugins

There's a registry key with value contains the above directory path. The

registry key looks something like (depending on the Netscape version):

\HKEY_LOCAL_MACHINE\SOFTWARE\Netscape\Netscape Netvigator\4.5.1(en)\Main\Plugins

Directory

You can modify the above reg. key to point to a different directory which

contains another version of plugin binaries.

I haven't try this yet but you can give it a try. You may want to run a version

of plugin binaries with the same version of jre. Currently, we don't support mixed versions of plugin and jre as mentioned in my

earlier posting.

Hope this helps.

Cheers!

Sun-DTS

jdcusr1 at 2007-6-29 11:58:33 > top of Java-index,Desktop,Deploying...
# 3

> Below is an Unsupported way of runnning diff jre's:-

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>

> The Java Plugin (JPI) is now integrated with the JRE

> (since

> JDK1.3) and it only works well with the same JRE.

> There is no

> supported in using an alternate JRE with the Java

> Plugin. The main

> reason is that the plugin makes use of sun.* classes,

> which are not

> guaranteed to remain the same from JRE to JRE.

>

> The current policy is: JPI v1.x.y should work with any

> update release

> of 1.x.y. However, we don't assure the backward

> compatibilities of

> older JRE.

>

> With this being made clear there might an UNSUPPORTED

> workaround that

> developers can try to support both JDK1.3 and 1.2.2

> Applets using

> JRE1.3.0_02. Some minor configuration changes are

> needed when executing

> JDK1.2.2 Applets then 1.3 Applets and vice versa.

>

> First install JRE1.2.2_00x followed by JRE1.3_0x on

> your client

> systems.

>

> To run JDK1.2.2 Applets with JPI1.3 launch the JPI 1.3

> Control Panel.

> The JRE of choice under the Advance tab should read :

> JRE1.2 in

> "c:\Program Files\JavaSoft\JRE1.2" and under the Basic

> tab add to the

> Java Run Time Parameters field the "-classic" option

> or you will get

> the following error message:

>

> "The Java Runtime Environment cannot be loaded from

> <D:\PROGRA~1\JavaSoft\JRE\1.2\bin\hotspot\jvm.dll>"

>

> because JPI1.3 no longer knows about the classic

> directory by default.

>

> The file with the following filename format includes

> details of which

> Java runtime and jre runtime parameters to use.

>

> <user_dir>\.java\properties130_02 (e.g

> c:\WINNT\profile\<user_login>\.java\properties130_02)

>

> You can customize this file for the different users

> who are using JDK

> 1.2.2 Applets as oppose to 1.3 Applets. Developers can

> create two

> properties files and the users will need to switch in

> the appropriate

> properties into properties130_02 to invoke the desired

> JRE. A simple

> .bat file can be created on Windows to simplify this

> process for the

> users.

>

> Note: Developers should fully test their applets in

> this environment to

> understand what strange behaviors to expect. From our

> testing the java

> console does not display itself when using jre1.2.2

> with JPI1.3 but

> with the JRE1.3 as the chosen runtime everything seems

> to work.

>

> Another approach:

>

> On NT, the plugin binaries (NPJava*.dll) are installed

> under a directory as

> follows:

>

> C:\Program

> Files\Netscape\Communicator\Program\Plugins

>

> There's a registry key with value contains the above

> directory path. The

> registry key looks something like (depending on the

> Netscape version):

>

> \HKEY_LOCAL_MACHINE\SOFTWARE\Netscape\Netscape

> Netvigator\4.5.1(en)\Main\Plugins

> Directory

>

> You can modify the above reg. key to point to a

> different directory which

> contains another version of plugin binaries.

>

> I haven't try this yet but you can give it a try. You

> may want to run a version

> of plugin binaries with the same version of jre.

> Currently, we don't support mixed versions of plugin

> and jre as mentioned in my

> earlier posting.

>

> Hope this helps.

> Cheers!

> Sun-DTS

I am currently trying to implement a java applet and I am having the same problems with JRE versions. I downloaded the beta for 1.4 and was able to run my applet and the offending third-party applet(version 1.2.2_08). What I found interesting, was that the java console for the third-party app showed to be running 1.4. Is this expected and how can I verify that the applet is actually executing using the 1.2.2_08 version that it expects?

gbedwell at 2007-6-29 11:58:33 > top of Java-index,Desktop,Deploying...