简体   繁体   中英

applet NullPointerException

I've been working on a game in an applet. In Eclipse it has been working completely fine, but when I sign it and load it in my browser, it throws a NullPointerException, without any further information. What can I do?

You don't give very much information here, but I can make a guess that you are calling getAppletContext and it is returning null, because the browser's java implementation is broken. Try the applet viewer, and try a different browser, and see if it works there.

That happen to me once. You'll need to go to:

  • Configure Java.
    • Security.
    • Exception List
    • Edit the list adding the directory of your applet.

This, I think, should fix the problem!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM