Hi Angel,
Java detection is tricky. We are using this library to check if Java is
available and respond with Jmol or Jsmol accordingly.
http://www.pinlady.net/PluginDetect/
As far as we can tell it seems to work reasonably well, however I'd be
interested to hear if there are any problems with this.
We are using the following code for the switch:
var defaultJmol = "HTML5 IMAGE";
var javaEnabled = (function(pd) {
var enabled = false;
function init(plugin) {
console.log('Java detected: ' + plugin.getInfo('Java').isPlugin2 );
enabled = (plugin.getInfo('Java').isPlugin2 === 1 )? true : false ;
}
if (pd) {
init(pd);
}
return enabled;
})(PluginDetect);
// Make JAVA default when enabled / page is loaded
if (javaEnabled) {
defaultJmol = 'JAVA ' + defaultJmol;
}
// Change default mode if set from dropdown. Choices include WebGL and
JSMol (HTML5)
defaultJmol = "<%= params.getJmolMode()%>" || defaultJmol;
which is then passed on via jmolInfo (use: defaultJmol) .
Andreas
On Wed, Apr 23, 2014 at 5:20 AM, Angel Herráez <[email protected]> wrote:
> Dear Jmolers
>
> I see that PDB claims to be able to detect if Java is installed
> http://www.pdb.org/pdb/browser/browsercheck.do
>
> Have you had the chance to test that in systems where Java is
> installed but disabled? Our common conclusion until recently was
> that there was not a trustable way to detect if Java is functional
> (in orde to load Jmol or JSmol)
> I am curious about whether some new trick has come.
>
> They say they are using functionality from Google
> http://www.whatbrowser.org/
>
>
>
> ·
> Dr. Angel Herráez
> Biochemistry and Molecular Biology,
> Dept. of Systems Biology, University of Alcalá
> E-28871 Alcalá de Henares (Madrid), Spain
>
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
--
-----------------------------------------------------------------------
Dr. Andreas Prlic
Senior Scientist, RCSB PDB Protein Data Bank
University of California, San Diego
(+1) 858.246.0526
-----------------------------------------------------------------------
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users