Java 6 Update 24 Copy & Paste Fix

Posted: 25 April, 2011 in Java

With Java 6 Update 24, the ability to copy & paste from a computer’s clipboard into a Java applet has been disabled due to security issues.

Work around: Add following line to your java.policy file:

permission java.awt.AWTPermission “accessClipboard”

Step 1: You can find such file “java.policy” in –> C:\Program Files\Java\jre6\lib\security\

Step 2 (Only for Win 7): Copy file to User Home folder : (Window 7) –> C:\Users\–your–user–name–\ AS “.java.policy
NOTE THE DOT (.) in the front of FILE

Step 4: Add the highlighted line to the file in section :




// default permissions granted to all domains

grant {
// Allows any thread to stop itself using the java.lang.Thread.stop()
// method that takes no argument.
// Note that this permission is granted by default only to remain
// backwards compatible.
// It is strongly recommended that you either remove this permission
// from this policy file or further restrict it to code sources
// that you specify, because Thread.stop() is potentially unsafe.
// See the API specification of java.lang.Thread.stop() for more
// information.

permission java.lang.RuntimePermission “stopThread”;

// allows anyone to listen on un-privileged ports
permission java.net.SocketPermission “localhost:1024-“, “listen”;

// “standard” properies that can be read by anyone

permission java.awt.AWTPermission “accessClipboard”;
……….
….


Step 4: SAVE file and Reload browser.

Step 5: You should have COPY/PASTE enabled now. Have fun…!

Reference

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s