I think I observed here a strange phenomenon with Opera's applet-showing
mechanism.
I'm using Opera 10.10 on a current Kubuntu with the Java 6 OpenJDK JRE.
(1.6.0_18)
I'm using an HTML page [1] with this applet tag:
<applet code='applet.HelloWorld'
width=300
height=300
>
<param name='archive' value='./../applet/client.jar'>
</applet>
(This is the HelloWorld-Applet from the Applet Development tutorial[2],
with a slightly modified HTML file from the same source.)
The Jar file is at the indicated location and contains the class file
for the class applet.HelloWorld, and there are no individual class files
on the server.
My problem: I sometimes get a "Applet not found" error message,
accompanied by the following stack trace in the Java console:
java.lang.ClassNotFoundException: applet.HelloWorld
at com.opera.AppletClassLoader.findClass(AppletClassLoader.java:369)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at com.opera.AppletClassLoader.loadClass(AppletClassLoader.java:433)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at com.opera.AppletPanel.runLoaderThread(AppletPanel.java:410)
at com.opera.AppletPanel.run(AppletPanel.java:384)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: HTTP Connection failed.
at com.opera.AppletClassLoader.readClassFile(AppletClassLoader.java:378)
at com.opera.AppletClassLoader.access$100(AppletClassLoader.java:34)
at com.opera.AppletClassLoader$4.run(AppletClassLoader.java:360)
at java.security.AccessController.doPrivileged(Native Method)
at com.opera.AppletClassLoader.findClass(AppletClassLoader.java:358)
... 6 more
After leaving the page, clearing the class loader cache (x in the java
console) and revisiting the page, the applet shows up good.
I can reproduce this on a local HTTP server, and there the access log
shows Opera accessing:
- de/exampleapplet.html [200]
- applet/client.jar [200]
- applet/client.jar [200]
- de/applet/HelloWorld.class [404]
==> this gets me the error message.
After clearing the Classloader chache and revisiting, the following
accesses are recorded:
- de/exampleapplet.html [200]
- de/applet/HelloWorld.class [404]
==> this gets me a running Applet (from the client.jar fetched before).
It looks like the jar file is in some cache and is not used on the first
time, but used on the second time.
On Firefox it works without problems, Konqueror too. (They both don't
fetch the HelloWorld.class after accessing client.jar.)
The same occurred on a SuseLinux in my university account (I don't know
now which Opera version (I suppose 10.10), but it's the same JRE).
First, can someone reproduce this?
Second, has someone any workarounds (other than "leave the page, type x
in the java console and revisit" or "use another browser")?
Thanks
Paul
[1] http://www.math.hu-berlin.de/~ebermann/test/de/exampleapplet.html -
it also has the client.jar at the searched location. (Will not be there
forever.)
[2] http://java.sun.com/docs/books/tutorial/deployment/applet/index.html
> First, can someone reproduce this?
I disabled/got rid of java long ago because it only caused me trouble, so
unfortunately I can't help here.
> Second, has someone any workarounds (other than "leave the page, type x
> in the java console and revisit" or "use another browser")?
Try starting Opera with the -debugjava command line switch. Perhaps it'll
get you some more information.
In the 'use another browser' category: try the Opera 10.60 beta (or
snapshots)
Opera 10.10 and earlier directly talk to java, while the newer versions
use the java plugin like other browsers do.
10.60 beta: http://www.opera.com/browser/next/
10.60 snapshots: http://my.opera.com/desktopteam/blog/
Stuff to read:
http://my.opera.com/ruario/blog/2010/06/18/java-still-not-working
http://my.opera.com/ruario/blog/2010/06/19/thristy-for-some-icedtea-perhaps-you-should-try-a-hot-cup-of-java
You can try to get it to work in 10.10 and then do it again for 10.60, or
you can skip 10.10 and go for the last version directly. If you don't want
to upgrade your current install yet, get a tar.gz/tar.bz2 archive. Just
untar and run opera in the extracted dir.
Good luck :)
--
Remco Lanting
[Unofficial Opera bug tracker links]
http://opera.remcol.ath.cx/bugs |
http://my.opera.com/community/forums/topic.dml?id=217364 |
remco.lanting...@gmail.com
Not really ...
On browser-start:
NPP_GetValue()
NPP_GetValue()
NPP_GetValue()
On starting the java-console:
opera: [Java] Adding '/usr/math/java/jdk1.6.0_13/jre/lib/plugin.jar'
to classpath.
On loading the web-page with the applet: nothing.
So, this does not really help.
But thanks for the suggestion.
> In the 'use another browser' category: try the Opera 10.60 beta (or
> snapshots)
>
> Opera 10.10 and earlier directly talk to java, while the newer versions
> use the java plugin like other browsers do.
>
> 10.60 beta:http://www.opera.com/browser/next/
> 10.60 snapshots:http://my.opera.com/desktopteam/blog/
I can't install it here (not having root rights), but may try at home.
> You can try to get it to work in 10.10 and then do it again for 10.60, or
> you can skip 10.10 and go for the last version directly. If you don't want
> to upgrade your current install yet, get a tar.gz/tar.bz2 archive. Just
> untar and run opera in the extracted dir.
The thing is, I don't simply want to run this applet (not the
helloworld, but a more useful one) for me, but enable anyone visiting
our website running it. It is about the only thing people will visit
our website for. And there are still quite some 10.10-users (and older
versions) out there, I suppose. (And, last but not least, it should
run on our development computers ...)
Thanks
Paul
>> In the 'use another browser' category: try the Opera 10.60 beta (or
>> snapshots)
>>
>> Opera 10.10 and earlier directly talk to java, while the newer versions
>> use the java plugin like other browsers do.
>>
>> 10.60 beta:http://www.opera.com/browser/next/
>> 10.60 snapshots:http://my.opera.com/desktopteam/blog/
>
> I can't install it here (not having root rights), but may try at home.
Grab a tar.gz/tar.bz2. You can run those from the untarred dir, no install
needed.