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?
My mistake, I meant the photo center at walmart.ca
They might have hardcoded the version of the Java runtime to check against.
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.
The problem seems to be here:
probably the guy is checking against JREs less than these.
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?
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?
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.
getJREs() returns an empty list if you install the JDK without a public JRE.
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.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.