aspose file tools*
The moose likes Applets and the fly likes Dynamic Versioning using JRE version 1.5.0_09 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Dynamic Versioning using JRE version 1.5.0_09" Watch "Dynamic Versioning using JRE version 1.5.0_09" New topic
Author

Dynamic Versioning using JRE version 1.5.0_09

Vivg Gupta
Greenhorn

Joined: May 04, 2006
Posts: 16
Hi,

I have an applet window in my code. I want that applet to run only with JRE version 1.5.0_09 or higher. So i am using Dynamic Versioning. The code i am using is:

document.write('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="1#Version=1,5,0,09" WIDTH="274" HEIGHT="72" >\n');
document.write('<PARAM NAME="type" VALUE="application/x-java-applet;jpi-version=1.5.0_09">\n');

Now the problem is that my applet is not running with version 1.5.0 or less but with versions like 1.5.0_06 its working fine. Any idea why??

Thanks,
Vivek.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42611
    
  65
The latest Plugin Developers Guide no longer mentions the type attribute for the object tag, only for the embed tag. The Guide for 1.4 does, though. Strange.

Why is it that the applet should run on 1.5.0_09, but not on 1.5.0_06? They are API-compatible, after all.
[ December 22, 2006: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
Vivg Gupta
Greenhorn

Joined: May 04, 2006
Posts: 16
Due to some latest standards,
�Sun Java Runtime Environment (JRE) - Establishes JRE version
1.5.0_09 and 1.5.0_10 as Mainstream/Standard across the Enterprise for running Java code on personal computers. Sun JRE version 1.5.0_06 and version 1.4.2_xx have been moved to the Retire/Contain phase of the TSS Technology Lifecycle.�

That's why i want to have the applet running only for the latest versions so that end users have version 1.5.0_09 or higher.

It would be great if you can tell me the solution so that the applet works only for the version 1.5.0_09 or higher.

Thanks,
vivek.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42611
    
  65
If the applet failed to run on _06 due to some bug that _09/_010 fixed, I'm sure the users would tell you about it (and then they would be advised to upgrade the JVM). Until then, why worry? If corporate policy is to no longer use _06 at all, just tell the users/sys admins to uninstall it, and install the newer version. Why making the users (and your) life harder by preventing something that works?
Vivg Gupta
Greenhorn

Joined: May 04, 2006
Posts: 16
Thats fine but we need to implement the same so that the end users follow it strictly. That's why the applet should not run with version less than 1.5.0_09.

do we any solution for the same? I am not getting as to how the versions less than 1.5.0_09 are working.

Thanks,
Vivek.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Why not let the applet load, then check the "java.version" System property, and abort for versions you don't want to run under.


[Jess in Action][AskingGoodQuestions]
Vivg Gupta
Greenhorn

Joined: May 04, 2006
Posts: 16
Ya right. That seems to be a feasible solution. Thanks for the same.

But is there any specific reason why dynamic versioning is not working properly with version 1.5.0_09?
wes Tucker
Greenhorn

Joined: Mar 16, 2007
Posts: 1
Just ran into this myself. Figured out that java 1.5 is storing the version number as 5.x.x.x

so for jre 1.5.0_11-b03 instead of using :


use:


I checked in the registry to see what dll was being pointed to by the clsid, then browsed to the dll in windows, right click.. properties..
looked on the version tab
File Version shows: 5.0.110.3
Full Version shows: 1.5.0_11-b03

I never did find a link online with this answer. Seems like it would be in a few more places.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dynamic Versioning using JRE version 1.5.0_09