Any workaround to getting Copy/Paste working in JDK 7 AWT Applet on Mac?

前端 未结 3 1742
情话喂你
情话喂你 2021-01-15 06:59

Since Apple forced the update to JDK 7 on Mac, old AWT applets no longer support copy/paste. For example, if you visit:

Simple AWT Textfield Example

you cann

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-15 07:30

    Oracle released Java 6 Update 24 in February 2011 to remedy 21 vulnerabilities: Announcement

    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:

    1. Create a digital signature for the applet.
    2. Work around: If you do not want to work with the digital signature, add to your java.policy file the following line: permission java.awt.AWTPermission "accessClipboard"

提交回复
热议问题