jQuery in Action, 2nd edition*
The moose likes Applets and the fly likes applet error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "applet error" Watch "applet error" New topic
Author

applet error

chris pote
Greenhorn

Joined: Dec 28, 2009
Posts: 8
some how i made an applet that works perfectly when run from the eclipse ide
but as soon as i try with my browser it explodes with errors ><
after searching for a while some 1 said it needed signed and gave a
self sign method , did that but it still gives this error , wtf is wrong with it

java.lang.NullPointerException
at sun.plugin2.applet.Plugin2Manager.findAppletJDKLevel(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NullPointerException

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
Post the complete APPLET tag that you're using in the HTML page. Also describe the directory hierarchy of where the various involved files are in relation to the HTML file, particularly any class and jar files.


Ping & DNS - my free Android networking tools app
chris pote
Greenhorn

Joined: Dec 28, 2009
Posts: 8
currently its just a html page , sitting right next to the jar that its in

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
code="theCommonComotion/UserInterface.class"

This is not correct. If "theCommonComotion" is a package name, then the attribute should read "theCommonComotion.UserInterface". If it is a directory name, then it has no place in the code attribute. Is that a loose class file, or is the class part of the jar file?
chris pote
Greenhorn

Joined: Dec 28, 2009
Posts: 8
ok , i changed the \ to a .
but i still get the errors

its part of the jar
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
Post the full stack trace (meaning all the exceptions - the first one in an exception chain is often just a consequence of the root cause).
chris pote
Greenhorn

Joined: Dec 28, 2009
Posts: 8
is this what you mean ?


Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
No, that's a thread dump. I was talking about the exception stack traces - you posted the beginning of those in the first post, but only the first few lines; there should be much more to it.
chris pote
Greenhorn

Joined: Dec 28, 2009
Posts: 8
that was all the lines , once in a while when i was changing around the html stuff i got larger stacks , but even after just testing it again all i get is



and yes i made sure to scroll all the way down lol

[edit]
i was looking at the commands and tried something , to do with stack trace and this came up

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
OK. The problem has something to do with the JVM not being able to find the classes it needs. So make sure that the browser can download the jar file at the URL you specify (should be the directory of the HTML file plus "ernya.jar").

You can also check the access logs of the web server in order to see which files are being requested, to make sure those are the correct ones, and that they result in "200" responses.
chris pote
Greenhorn

Joined: Dec 28, 2009
Posts: 8
theres a slight problem with that ...
i havent uploaded it to any where , i'm just trying to run it from my desktop and the html file ><
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: applet error