Copy & Paste Editing

To communicate data among applications with the copy & paste facility, the system (Linux, Window, ...) uses the clipboard. To prevent malicious applets from spying on information which goes to the clipboard, standard security managers for applets do not allow access to the clipboard. Happily, the security manager can be configured using a java policy file on the computer which launchs the Java Virtual Machine(JVM) (appletviewer or Browser).

If you already have a ~/.java.policy file, add the following lines at the end of the file. Otherwise, just create a file which contains these lines:

grant codeBase "http://www.dcs.ed.ac.uk/home/hase/webhase/javahase/*" {
permission java.awt.AWTPermission "accessClipboard";
};

This means: give permission to access the Clipboard to applets from a URL starting with http://www.dcs.ed.ac.uk/home/hase/webhase/javahase/

You will now be able to copy from local files and paste into JavaHASE editable text windows.

For further details, see Using the clipboard with JavaHase applets

Return to previous page
Frederic Mallet
Last modified: Wed Feb 13