Skip to main content

Java not being detected

9 replies [Last post]
cowwoc
Offline
Joined: 2003-08-24

I noticed that costco.ca photo center and other websites don't detect Java if I have UpdateN installed, but they did with the official releases. Any idea what broke?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cowwoc
Offline
Joined: 2003-08-24

My mistake, I meant the photo center at walmart.ca

carcour
Offline
Joined: 2003-06-18

They might have hardcoded the version of the Java runtime to check against.

cowwoc
Offline
Joined: 2003-08-24

They are using this script: http://costco.pnimedia.com/upload/java/PluginDetect.js

I tracked down the author of the script and emailed him about this. Hopefully we'll find out whether the script or JRE is at fault within a couple of days.

carcour
Offline
Joined: 2003-06-18

The problem seems to be here:
"1.7.0.15","1.6.0.15","1.5.0.14","1.4.2.13","1.3.1.18"
probably the guy is checking against JREs less than these.

cowwoc
Offline
Joined: 2003-08-24

In all honesty I still don't understand the contents of the searchJava() function but I'll take your word for it. Good catch! :)

... something else seems to be wrong though:

1) I hit a website that uses deployJava.js and it fails too
2) I went into Control Panel and noticed that I somehow managed to install the 32-bit and 64-bit JDKs but no JRE. java.exe comes from the JDK/bin directory so programs run just fine.

This brings up two questions:

1) Why didn't the JRE install?
2) Shouldn't deployJava.js detect the JDK as a valid JRE?

cowwoc
Offline
Joined: 2003-08-24

Okay, I just reinstalled Java. Now that the 32-bit JRE is installed both deployJava.js and PluginDetect.js work fine.

This still leaves us with the question (though admittedly it's not so important anymore): why doesn't the JDK installation count as a valid JRE? Shouldn't deployJava.js pick up on it?

rogyeu
Offline
Joined: 2006-07-30

Hi cowwoc,

Could you please elaborate which part of the deployJava.js is not working?

I used the first sample on DT Testing Guideline (https://jdk6.dev.java.net/testDT.html) which calls getJREs() and it seems working for me.

Thanks,
RY

cowwoc
Offline
Joined: 2003-08-24

getJREs() returns an empty list if you install the JDK without a public JRE.

rogyeu
Offline
Joined: 2006-07-30

Hi cowwoc,

When a user installs JDK 6uN (i.e. jdk-6u10-beta-bin-b13-windows-i586-p-06_mar_2008.exe), the default behavior of installing Public JRE is "yes". If the user specifically chooses not to install the Public JRE, it will not be registered to the system. Thus, it cannot be used (plug-in and webstart will not work with a simple click from a browser) unless the user manually associates the Private JRE with the application or file type (ie. open a JNLP file with "C:\Program Files\Java\jdk1.6.0_10\bin\javaws.exe). However, this is more of a hack than a regular install. In addition, Java icon will not show in Control Panel (64-bit issue is a bug, not our intention ;-) ), the "JAVA_HOME" will not be added to the system PATH, and etc...

I don't see any reason why getJREs() should return true in such case if user specifically chooses not to install a Public JRE and the JRE is not registered with the system.

Please let me know if I missed anything.

-- RY