Last modified: 2007-09-09 01:37:12 UTC
The OggHandler tests for "navigator.javaEnabled()" and for the existence of the MIME-type "application/x-java-applet". The second test fails, if Opera directly access Java and not uses a java plugin dll. I think the first test is sufficient, because Java isn't a plugin in every browser but could be supported natively (like in Opera).
Do you have plugins enabled? It's in the Tools>Quick Preferences menu. The first test is not sufficient, see bug 10949.
Of course plugins are enabled. But as I mentioned in my first comment, Opera doesn't need a Java plugin, but is able to access Java directly. So only if you have the NPJavaXX.dll (e.g. NPJava14.dll) in your plugins folder the MIME-type exists in navigator.mimeTypes, because otherwise it isn't a plugin.
But even if it would be in the mimeTypes array, the OggHandler wouldn't work, because it tests, if there is a plugin - which isn't true, if it's internally supported. Maybe one could argue, that there should be a reference to "Mozilla default plugin", but no browser does this and the standard doesn't declare anything about that.
So I don't really have a solution. That navigator.javaEnabled() could be true, if there is no Java on the machine, was new to me - I personally think, a browser should disable java, when there is no java present. So I would only test javaEnabled() ;)
You could just install the plugin, couldn't you?
You don't have to give me references for the navigator.mimeTypes array -- I read them before I wrote the software, and I studied the contents of navigator.mimeTypes on Opera on my own system. The Mozilla plugin will add application/x-java-applet to navigator.mimeTypes in both Mozilla and Opera.
Alright, my mistake, it looks like Opera is pulling a Java plugin out of my Netscape Communicator directory, of all places. It doesn't seem to load the Mozilla plugin in the JRE directory, so it wouldn't work on a standard install of Opera and Java. I'll put in a special case.
Special case done in r25673, live on Wikimedia right now.
It turns out that Opera silently disables the "Java enabled" user preference, and hence navigator.javaEnabled(), if it fails to load a Java DLL. Browser detection (navigator.appName) is the only reasonable way to account for this difference between Opera and Mozilla.
Thanks a lot! It works now.