FireFox and JRE 6u1

Hi.

We use the following script code (below) to identify if WebStart is installed. This was mostly found in various formats on SUN sites.

This worked fine for us until JRE6 is installed.

Problem:

With JRE6, on FIREFOX(2.0.0.3), the web-page continually reloads due to this portion of javascript code:

if(checkPlatform("win")){

navigator.plugins.refresh(true);

This still works fine in IE.

If we remove JRE6 and revert to the still installed JRE 1.5.0_10, then behaviour in Firefox returns to normal.

I am puzzled why the presence of JRE6 would cause this to occur, and would appreciate any comments/suggestions.

thanks,

--geoff

-Javascript code sample follows--

var javawsInstalled = 0;

var isIE ="false";

if (navigator.mimeTypes && navigator.mimeTypes.length){

if (webstartVersionCheck("1.2")){

javawsInstalled=1;

}

else{

if (checkPlatform("gecko") || checkPlatform("opera")){

javawsInstalled=1;

}

else{

javawsInstalled=0;

}

}

}

else{

isIE ="true";

}

function webstartVersionCheck(versionString){

// Mozilla may not recognize new plugins without this refresh

if(checkPlatform("win")){

navigator.plugins.refresh(true);

}

// First, determine if Web Start is available

if (navigator.mimeTypes['application/x-java-jnlp-file']){

// Next, check for appropriate version family

for (var i = 0; i < navigator.mimeTypes.length; ++i){

pluginType = navigator.mimeTypes[i].type;

if (pluginType =="application/x-java-applet;version=" + versionString){

returntrue;

}

}

}

}

function checkPlatform(string)

{

return detect.indexOf(string) + 1;

}

<SCRIPT LANGUAGE="VBScript">

on error resume next

If isIE ="true" Then

If Not(IsObject(CreateObject("JavaWebStart.isInstalled"))) Then

javawsInstalled = 0

Else

javawsInstalled = 1

End If

End If

</SCRIPT>

[3733 byte] By [sanddwellera] at [2007-11-27 2:24:47]
# 1

A bug has been filed on this:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6552959

You can add your name to the watch list and get notified of any progress towards the resolution of this bug. If you can't see the bug details from the link above, pls wait for a day or two for it to be visible.

Thanks,

Steve

stevechena at 2007-7-12 2:32:16 > top of Java-index,Desktop,Runtime Environment...
# 2

Thanks for the bug pointer, Steve. However, the link doesnt seem to work, and I cannot find that bug number. (nor similar reports in bug database searching by keywords)..

thanks

--geoff

Oops just read ALL of yoru message.. Sorry.

too eager :)

Will wait a couple of days, as suggested!!

Message was edited by:

sanddweller

sanddwellera at 2007-7-12 2:32:16 > top of Java-index,Desktop,Runtime Environment...