Copy To Clipboard Doesn’t work in Java
Writing by shivdev on Friday, 30 of May , 2008 at 10:59 am
We recently migrated from Java 4 to Java 6 and found out that Copy To Clipboard from JTable, JTextBox etc. just didn’t work.
String selection = “Clip This”;
StringSelection data = new StringSelection(selection);
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(data, data);
Then I happened to notice that there was an exception on startup and it couldn’t find flavormap.properties.
FileNotFoundException:C:\Program%20Files\Java\jre1.6.0_06\lib\flavormap.properties
It occurred to me at that point that the there was a SPACE in the location “Program Files” and God Knows why thats not handled correctly. So I simply uninstalled Java 6 from its Default Location and reinstalled it in C:\jdk1.6.0_6 and that did it for me.
Leave a comment
Category: Java
- Add this post to
- Del.icio.us -
- Digg -
- -
- Tweet -
-
-