Detecting Java Browser Support Using jQuery

Today we’re going to quickly look at detecting Java (not JavaScript) using jQuery. It is actually very simple using the jQuery Browser Plugin. Once you have the plugin loaded, it extends the $.browser object to give you the following:

$.browser.flash   //Flash
$.browser.sl     //Silverlight
$.browser.pdf    //PDF format
$.browser.java  //Java
$.browser.qtime   //Quicktime
$.browser.wmp    //Windows Media Player
$.browser.shk     //Shockwave
$.browser.rp     //Realplayer

As you can see, we gain more than just Java detection, but Java detection is the one we’re looking for in this example.

You can view a working example on this Java Detection Using jQuery page and the source code is naturally on github.