Copy And Paste in Java Applets

Copy And Paste in Java Applets

Taken from this article.

Recently I found it impossible to use cut and past from any java app. Turns out this is a security setting which is turned off by default.

Navigate to

C:\Program Files (x86)\Java\jre6\lib\security

And edit a file called java.policy

Add this line just below

// "standard" properies that can be read by anyone

permission java.awt.AWTPermission "accessClipboard";

Save the file to your desktop and cut and past it back into the folder (windows prevents programs not running as admin to save or overwrite files in that directory)

Restart the app, it should work now.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.