JavaScript 1.1
navigator.javaEnabled( )
true if Java is supported by and enabled on the current browser; false otherwise.
You can use navigator.javaEnabled( ) to check whether the current browser supports Java and can therefore display applets.