简体   繁体   English

applet NullPointerException

[英]applet NullPointerException

I've been working on a game in an applet. 我一直在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. 在Eclipse中它已经完全正常工作,但是当我签名并在浏览器中加载它时,它会抛出NullPointerException,而没有任何进一步的信息。 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. 你在这里没有提供太多的信息,但是我可以猜测你正在调用getAppletContext并且它返回null,因为浏览器的java实现被破坏了。 Try the applet viewer, and try a different browser, and see if it works there. 尝试applet查看器,尝试使用其他浏览器,看看它是否有效。

That happen to me once. 这发生在我身上一次。 You'll need to go to: 你需要去:

  • Configure Java. 配置Java。
    • Security. 安全。
    • Exception List 例外清单
    • Edit the list adding the directory of your applet. 编辑添加applet目录的列表。

This, I think, should fix the problem! 我认为,这应该解决问题!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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