问题描述
由于 Apple 在 Mac 上强制更新到 JDK 7,旧的 AWT 小程序不再支持复制/粘贴.例如,如果您访问:
Since Apple forced the update to JDK 7 on Mac, old AWT applets no longer support copy/paste. For example, if you visit:
您无法复制并粘贴到该页面上的小程序文本字段中.我已经确认您仍然可以在带有 JDK 7 的 Windows 上复制/粘贴 AWT.
you cannot copy and paste into the applet text field on that page. I've confirmed that you can still copy/paste in AWT on Windows with JDK 7.
有人知道解决方法吗?
推荐答案
Oracle 于 2011 年 2 月发布了 Java 6 Update 24 以修复 21 个漏洞:公告
Oracle released Java 6 Update 24 in February 2011 to remedy 21 vulnerabilities: Announcement
作为此安全版本的一部分,复制和复制的能力已禁用从计算机剪贴板粘贴到 Java 小程序的功能.
As part of this security release, the ability to copy & paste from a computer's clipboard into a Java applet has been disabled.
要解决此问题,有两种解决方案:
To fix this issue there are 2 solutions:
- 为小程序创建数字签名.
- 变通方法:如果您不想使用数字签名,请将以下行添加到您的 java.policy 文件中:permission java.awt.AWTPermission "accessClipboard"
这篇关于在 Mac 上的 JDK 7 AWT Applet 中让复制/粘贴工作的任何解决方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!