Friday 15 March 2013

java - Copy/Paste not working in a signed Applet -



java - Copy/Paste not working in a signed Applet -

i've signed applet (which verifies correctly jarsigner) reason not allow re-create , paste scheme clipboard jtextfield despite documentation telling me supposed work signed applets.

furthermore, i've other applets signed same keyfile allow me re-create , paste text. have searched high , low on net , can't seem find clues. making me pull hair out there seems no way debug (no output in console - no thrown exceptions).

does 1 have ideas on how can debug find out why java doesn't particular applet?

many suggestions!

well, turns out release of java plug-in 1.6.0_24 in feb 2011, re-create , paste scheme clipboard deemed security hole , disabled. can re-create , paste between applets. if seek utilize main clipboard, can't copied in.

so there couple of options workaround. can roll before version of plug-in. work, chances future releases still maintain re-create , paste disabled, you'd never able upgrade.

the other alternative provide custom java security policy file enables access scheme clipboard again.

first locate local java security policy file. file named java.policy , should in lib\security folder of java installation. on windows 7, can found @ c:\program files (x86)\java\jre6\lib\security. re-create file home folder (ex. c:\users\kyle). rename file .java.policy (note period @ beginning). edit file in text editor. locate line of text:

// "standard" properies can read

add next line below so:

// "standard" properies can read permission java.awt.awtpermission "accessclipboard";

save file. close open browsers , ensure java not running before testing.

source: http://blogs.oracle.com/kyle/entry/copy_and_paste_in_java

java applet clipboard next-generation-plugin signed-applet

No comments:

Post a Comment