![]() |
Re: Differences between Appletviewer and Browser plugin
On Sun, 15 Jul 2007 11:21:21 +0000, Daniel Kraft <d@domob.eu> wrote,
quoted or indirectly quoted someone who said : >The applet is this one: >http://domob.do.funpic.de/klammgolf/turnier.php?id=1 your invoking code looks like this <applet code="eu.domob.klammgolf.player.PlayApplet" width="750" height="550" archive="java/klammgolf.jar, java/minigolf.jar, java/Piccolo.jar , , , , "> <param name="numCourses" value="4" /> <param name="course0" value="bahnen/bahn_1182668925894638649.jar" /> <param name="course1" value="bahnen/bahn_1182668933804355172.jar" /> <param name="course2" value="bahnen/bahn_11826689382141266564.jar" /> <param name="course3" value="bahnen/bahn_1182668944163310470.jar" /> Du benötigst eine <a href="http://java.sun.com/">Java-VM</a>, um Klammgolf spielen zu können. </applet> My typical invoking code looks like this: <applet class="cmp" code="com.mindprod.wassup.Wassup.class" archive="wassup.jar" width="540" height="310" alt="Sorry, you need Java to run this Applet"> </applet> Note the .class on the code param. Also there should be no embedded spaces in your archive param, just commas. I would get rid of the trailing commas. -- Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com |
Differences between Appletviewer and Browser plugin
Hi all,
first of all, I'm not completely sure whether this is really a good group for Java Applet questions -- if not, please point me to another one. I've written a Java Applet; my problem is that the very same applet runs fine under Sun's appletviewer, but the Browser plugin (Mozilla) of the same JDK (1.5.0_06, GNU/Linux) complains that it does not find my Applet class. What are the differences between appletviewer and the Browser with plug in that could make such a thing happen? I'm currently a bit confused by this problem... The applet is this one: http://domob.do.funpic.de/klammgolf/turnier.php?id=1 # appletviewer http://domob.do.funpic.de/klammgolf/turnier.php?id=1 works fine, opening this URI in my browser gives me a "broken applet" symbol! Could this be a problem with caches or something similar? Many thanks, Daniel -- Got two Dear-Daniel-Instant Messages by MSN, associate ICQ with stress -- so please use good, old E-MAIL! |
Re: Differences between Appletviewer and Browser plugin
Daniel Kraft wrote:
... >I've written a Java Applet; my problem is that the very same applet runs >fine under Sun's appletviewer, but the Browser plugin (Mozilla) of the >same JDK (1.5.0_06, GNU/Linux) complains that it does not find my Applet >class. FF on Win. running Java 1.6 reports.. ... basic: Exception: java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file eu/domob/klammgolf/player/PlayApplet >What are the differences between appletviewer and the Browser with plug >in that could make such a thing happen? The differences between how applets behave in most browsers, running most Java versions, with any variety of plug-ins installed or security enabled, is slightly different in most combinations. If one combination (of browser make and version, combined with Java version, plug-ins/security) actually matched the behaviour of AppletViewer in every way, it would be almost purely by accident. >...I'm currently a bit confused by >this problem... Yes - applets can be that way - epsecially with every browser reporting the problem in slightly different ways. An earlier test with IE showed an odd applet loaded (odd in the sense that nothing seemed to be in the center of the GUI, just a title bar and a bar on the lower right), but when I clicked something that attempted to reload the page, IE 'froze and crashed'. >Could this be a problem with caches or something similar? Why not launch that applet using web start?* It uses applet viewer, and removes a lot of the browser based variables. At least the error messages, if any, should be consistent! * e.g. <http://www.physci.org/jws/#jtest> -- Andrew Thompson http://www.athompson.info/andrew/ Message posted via JavaKB.com http://www.javakb.com/Uwe/Forums.asp...neral/200707/1 |
Re: Differences between Appletviewer and Browser plugin
>> The applet is this one:
>> http://domob.do.funpic.de/klammgolf/turnier.php?id=1 > > your invoking code looks like this > > <applet code="eu.domob.klammgolf.player.PlayApplet" > width="750" height="550" > archive="java/klammgolf.jar, java/minigolf.jar, java/Piccolo.jar , , > , , "> > <param name="numCourses" value="4" /> > <param name="course0" > value="bahnen/bahn_1182668925894638649.jar" /> > <param name="course1" > value="bahnen/bahn_1182668933804355172.jar" /> > <param name="course2" > value="bahnen/bahn_11826689382141266564.jar" /> > <param name="course3" > value="bahnen/bahn_1182668944163310470.jar" /> > Du benötigst eine <a href="http://java.sun.com/">Java-VM</a>, um > Klammgolf > spielen zu können. > </applet> > > My typical invoking code looks like this: > <applet class="cmp" code="com.mindprod.wassup.Wassup.class" > archive="wassup.jar" width="540" height="310" alt="Sorry, you need > Java to run this Applet"> > </applet> > > Note the .class on the code param. Also there should be no embedded > spaces in your archive param, just commas. I would get rid of the > trailing commas. Thanks for your reply, however, the very same invocation code used to work with a previous version of my Java code (unfortunatelly I can't trace down which change made it break), the main difference between these versions is that I added a Frame which displays what prior was the Applet's content and another Applet into the same Jar which is not referenced from this file. I changed my code according to your suggestions but I still get this error from within the browser: load: class eu.domob.klammgolf.player.PlayApplet.class not found. java.lang.ClassNotFoundException: eu.domob.klammgolf.player.PlayApplet.class at sun.applet.AppletClassLoader.findClass(AppletClass Loader.java:168) at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06) at sun.applet.AppletClassLoader.loadClass(AppletClass Loader.java:119) at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51) at sun.applet.AppletClassLoader.loadCode(AppletClassL oader.java:599) at sun.applet.AppletPanel.createApplet(AppletPanel.ja va:721) at sun.plugin.AppletViewer.createApplet(AppletViewer. java:1757) at sun.applet.AppletPanel.runLoader(AppletPanel.java: 650) at sun.applet.AppletPanel.run(AppletPanel.java:324) at java.lang.Thread.run(Thread.java:595) Caused by: java.io.IOException: open HTTP connection failed. at sun.applet.AppletClassLoader.getBytes(AppletClassL oader.java:271) at sun.applet.AppletClassLoader.access$100(AppletClas sLoader.java:44) at sun.applet.AppletClassLoader$1.run(AppletClassLoad er.java:158) at java.security.AccessController.doPrivileged(Native Method) at sun.applet.AppletClassLoader.findClass(AppletClass Loader.java:155) ... 9 more Exception in thread "Thread-5" java.lang.NullPointerException at sun.plugin.util.GrayBoxPainter.showLoadingError(Gr ayBoxPainter.java:153) at sun.plugin.AppletViewer.showAppletException(Applet Viewer.java:1928) at sun.applet.AppletPanel.runLoader(AppletPanel.java: 655) at sun.applet.AppletPanel.run(AppletPanel.java:324) at java.lang.Thread.run(Thread.java:595) java.lang.NullPointerException at sun.plugin.util.GrayBoxPainter.showLoadingError(Gr ayBoxPainter.java:153) at sun.plugin.AppletViewer.showAppletStatus(AppletVie wer.java:1861) at sun.applet.AppletPanel.run(AppletPanel.java:369) at java.lang.Thread.run(Thread.java:595) Exception in thread "thread applet-eu.domob.klammgolf.player.PlayApplet.class" java.lang.NullPointerException at sun.plugin.util.GrayBoxPainter.showLoadingError(Gr ayBoxPainter.java:153) at sun.plugin.AppletViewer.showAppletException(Applet Viewer.java:1928) at sun.applet.AppletPanel.run(AppletPanel.java:533) at java.lang.Thread.run(Thread.java:595) I've really no clue at all why something would work inside appletviewer and not the browser. But the problem must be some difference in how they resolve or download classes, must it not? Cheers, Daniel -- Got two Dear-Daniel-Instant Messages by MSN, associate ICQ with stress -- so please use good, old E-MAIL! |
Re: Differences between Appletviewer and Browser plugin
Daniel Kraft schrieb:
> > I changed my code according to your suggestions but I still get this > error from within the browser: > > load: class eu.domob.klammgolf.player.PlayApplet.class not found. > java.lang.ClassNotFoundException: > eu.domob.klammgolf.player.PlayApplet.class > at sun.applet.AppletClassLoader.findClass(AppletClass Loader.java:168) [...] > > I've really no clue at all why something would work inside appletviewer > and not the browser. But the problem must be some difference in how > they resolve or download classes, must it not? I visited your page <http://domob.do.funpic.de/klammgolf/turnier.php?id=1> with my browser (Mozilla/4.0 (Windows XP 5.1) with Java Plug-in 1.6.0_01) and also got the "applet broken" icon. But in my Java console I have the output: java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file eu/domob/klammgolf/player/PlayApplet at java.lang.ClassLoader.defineClass1(Native Method) ... Note that this exception is about the PlayApplet class being *corrupted*, not about PlayApplet class being *not found*. When looking into your jar file <http://domob.do.funpic.de/klammgolf/java/klammgolf.jar> with WinZip, I see that it contains all class files (including PlayApplet.class) *two* times. You should fix this first. -- Thomas |
Re: Differences between Appletviewer and Browser plugin
On Sun, 15 Jul 2007 13:31:03 +0000, Daniel Kraft <d@domob.eu> wrote,
quoted or indirectly quoted someone who said : >Caused by: java.io.IOException: open HTTP connection failed. Sounds like it might be having trouble reading the jars. Are they in the same directory as the *.html file that invoked them? Is your firewall blocking *.jar file downloads? -- Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com |
| All times are GMT. The time now is 05:50 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.