gpt4 book ai didi

java - Applet 中的 AccessControlException

转载 作者:行者123 更新时间:2023-12-02 00:50:24 26 4
gpt4 key购买 nike

这个小程序在 Eclipse 查看器中运行良好。我无法从任何浏览器运行它。我该如何解决这个问题?我从我的 java applet 控制台收到此错误:

Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.awt.AWTPermission watchMousePointer) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.awt.MouseInfo.getPointerInfo(Unknown Source) at nopulse.update(nopulse.java:448) at nopulse.paint(nopulse.java:316) at sun.awt.RepaintArea.paintComponent(Unknown Source) at sun.awt.RepaintArea.paint(Unknown Source) at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

最佳答案

在浏览器中运行的小程序使用安全管理器。有很多事情是不允许浏览器中的小程序执行的。如果您坚持让您的小程序执行这些操作,请将您的小程序部署为 signed applet

关于java - Applet 中的 AccessControlException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3446524/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com