5

The clipboard does not work with any Java applet on my install of Ubuntu 10.04. I am using the IcedTea plugin. I cannot copy/paste from Ubuntu to Java in either direction. However, IcedTea can copy to itself - that is, I can cut text from a Java applet and paste it into another part of that same applet. Other than this, clipboard support is fine across the rest of Ubuntu. Is there anything I can do to fix this?

1

5 Answers 5

6
gksudo gedit /etc/java-6-sun/security/java.policy

and/or

gksudo gedit /etc/java-6-openjdk/security/java.policy

or (for example)

gksudo gedit /opt/java/64/jre1.7.0_04/lib/security/java.policy

Add the following line down the bottom before the last closing bracket.

permission java.awt.AWTPermission "accessClipboard";

If you are having trouble finding the correct java.policy file to edit, you can try to locate the file using

$ sudo find / -name "*java.policy"
1

Similar to brendan's answer, but the silly reputation system means I have to spam with a totally new answer...

On my system (Ubuntu 12.04 running Oracle Java 1.7.0_04), I had to modify a different file, with

gksu gedit /opt/java/64/jre1.7.0_04/lib/security/java.policy

Then, as per brendan's answer, add the following line down the bottom before the last closing bracket.

permission java.awt.AWTPermission "accessClipboard";

If you are having trouble finding the correct java.policy file to edit, you can try to locate the file using

$ sudo find / -name "*java.policy"

I experienced this problem on an embedded applet in Firefox, and had to restart Firefox after editing the file.

[Feel free to delete this if my edits to brendan's posts get accepted, but I also wanted to comment in his answer with my version of Ubuntu and Java.]

0

I have this problem when copying text from Opera and trying to paste it in firefox and vice versa. I solve this by opening the Text Editor and pasting in it. Then I cut the text from the Text Editor and paste it in where ever I want.

0

The solution provided by brendan works, but it requires root access. To fix this issue with user rights, copy the file /etc/java-7-openjdk/security/java.policy to $HOME/.java/ and change the following line before the last closing brace:

permission java.awt.AWTPermission "accessClipboard";

If you use a different java version than java-7-openjdk change the path occordingly. You find the correct path with locate java.policy.

-1

For Opera --> Firefox. You use any clipboard manager eg Parcelite.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .