Logo SQLinForm

 

[solved] Online Version Java 6 Copy & Paste Fix

Anonymous User
[solved] Online Version Java 6 Copy & Paste Fix
March 15, 2011 10:53PM
Oracle released Java 6 Update 24 in February 2011 to remedy 21 vulnerabilities: Announcement

As part of this security release, the ability to copy & paste from a computer's clipboard into a Java applet like SQLinForm Online Version has been disabled.

To fix this issue there are 2 solutions:
    thumbs up Recommended solution: Accept the digital signature. This will allow SQLinForm Online to copy & paste the SQL from/to you clipboard.

    thumbs up Work around: If you do not want to accept the digital signature, add to your java.policy file the following line: permission java.awt.AWTPermission "accessClipboard"

smiling smileyThis issue only happens in the online version but not in the desktop versionsmiling smiley

Guido Thelen
Gu.The Software



Edited 13 time(s). Last edit at 12/26/2013 02:05PM by guidomarcel.
For me, going back to Java 6 release 22 (not 23) fixed the problem. Unfortunately I have no idea how to implement the java.policy solution you described.
dobrys
Re: Java 6 Release 24 Copy and Paste Fixeye popping smileyconfused smileysmiling bouncing smiley
March 16, 2011 11:07PM
Tested On Windows7 pro.

You can find such file (java.policy) in :
C:\Program Files\Java\jre6\lib\security\

Copy file to User Home folder : (Win7)
C:\Users\--your--user--name--\
AS ".java.policy"

NOTE THE DOT (.) in the front of FILE
add line
permission java.awt.AWTPermission "accessClipboard";
to 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";
..........
....
SAVE file and reload browser (firefox in my case)

You should have COPY/PASTE ENABLED Now
have fun

Dobrys
Anni
Re: Java 6 Release 24 Copy and Paste Fixeye popping smileyconfused smileysmiling bouncing smiley
May 03, 2011 06:38AM
I cannot open the java.policy file .. Windows ask what program created it .. any suggestions to help, I really need this to work.
Thanks in advance
Roedy Green
Re: Java 6 Release 24 Copy and Paste Fixeye popping smileyconfused smileysmiling bouncing smiley
October 02, 2011 06:35AM
See cut/paste

and policy file

They will tell you various ways around copy/paste not working and how to find the java.policy file. I have a dozen or so of them on my machine.
Anni
Re: Java 6 Release 24 Copy and Paste Fixeye popping smileyconfused smileysmiling bouncing smiley
May 03, 2011 07:52AM
I got it solved using notepad, thanks much for this it works!!
Anni
KZ
Re: Java 6 Release 24 Copy and Paste Fixeye popping smileyconfused smileysmiling bouncing smiley
December 08, 2012 12:20PM
This is great.Works for me!!! THX man!!!
Re: Java 6 Release 24 Copy and Paste Fixeye popping smileyconfused smileysmiling bouncing smiley
March 17, 2011 09:36AM
Finally It worked! I've used the method described by dobrys. I didn't know about C:\Users\--your--user--name--\ .java.policy stuff. Thanks again!
Sue
Re: Java 6 Release 24 Copy and Paste Fixeye popping smileyconfused smileysmiling bouncing smiley
June 03, 2011 11:16AM
Okay, I have tried this solution and got it all in the file but when I click on Save I get the message that access to program files is denied.
Any Idea how to get around this?

I have tried going back to the earlier version of Java but then it wont allow the page with the Chatroom to load. I am using Windows 7 and IE.

Your help would be greatly appreciated.
Thank you
Sue
David Vega
Re: Java 6 Release 24 Copy and Paste Fixeye popping smileyconfused smileysmiling bouncing smiley
March 17, 2011 07:22PM
Confirmed! It works now with the latest Java version. Thank you.

Warm regards,

David Vega
Will
Re: Java 6 Release 24 Copy and Paste Fixeye popping smileyconfused smileysmiling bouncing smiley
March 22, 2011 07:21PM
Hi dobrys,

Thank you, Thank you, Thank you!

You are the Best!

That solution worked great!

I have been trying for over a month to figure out why i couldn't copy and paste anymore from my java chat room! This worked!

Thanks a Million!
arrgh!

The fix didnt work for me at first because the java.policy file on my system was in a different location.

Enable the java console, load the sqlinform page with java app in it and press s in the console window.

It dumps system and deployment properties....

java.class.path = C:\\PROGRA~1\\Java\\jre6\\classes
java.home = C:\Program Files\Java\jre6
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.6.0_24-b07
os.name = Windows Vista
os.version = 6.0
...blahblahblah...
deployment.user.security.policy = file://C:/Users/John/AppData/LocalLow/Sun/Java/Deployment/security/java.policy

thats the one! placed the file there with your instructions and wonderful! cut and paste works again.

PS thanks for great tool!
I just want to say THANK YOU!

This was a major problem with my company and I'm being viewed as the "hero" for finding what to do about it, but this is where I found what to do about it. I did give credit by citing this link as my source.

Thank you again,
Matt
Is there a version of these instructions for non-programmers? I'd love to be able to paste into a Java chat room like I used to. But when you wrote "Accept the digital signature," what did that mean? Was there a time when I rejected it? Where do I go to accept it? Java's help is no help.

As for editing the java.policy file, I can find it, and I can open it with Notebook, but the formatting looks nothing like your example and I worry that if I revised and saved it, it would no longer work. Windows offers to look online for the proper program to open it, and that leads to a Policy Tool utility that I apparently do not have (the suggested Windows command prompt command doesn't work). As for copying the file to my home directory with a dot in front of the name, I don't have any idea what that's about. Is it to keep from damaging the original file while I work on editing it? Do I then remove the dot and save it back where it came from to replace the original file?

I must sound like an absolute idiot to you all.
Anonymous User
Re: Online Version - Java 6 Update 24 Copy & Paste Fixeye popping smiley
April 05, 2011 10:55PM
Hi Michael,
if the chat owner is not offering a digital signature and you are not able to edit the plocoy file then there is a 3rd but bot highly recommended solution, i.e. de-install Java 1.6 Update 24 and install 1.6 update 23
Best Regards
Guido



Edited 1 time(s). Last edit at 04/05/2011 10:56PM by guidomarcel.
Wow, you're really a genius.
I've been looking for this solution for a LONG LONG LONG time.
Works like a charm on Java version 1.6.0_25 running on an XP Pro machine. All I needed to do was search for the file java.policy and open it up with "Notepad" then copy and paste the statement into the file and save it. Restart the application and it started working.

Zach
I had this issue and it worked like a charm, though i have another problem. I use a program at work that uses java and for some reason when im using this java program and try to save a file to desktop , when i click on the save button, nothing happens. is there a fix for this?

thanks

James
Thank-you.

I'd previously reverted to old Java versions (as stated by the admin above), when FireFox went to version 5, even changing the Java version didn't seem to give me help.

In my /Users/myname/ directory the .java.policy file was initially hidden and after copying it and editing via Notepad I have Copy / Paste back. Thank-you!
Eldodsite
Re: Online Version - Java 6 Update 24 Copy & Paste Fix smiling smiley
November 15, 2011 11:26PM
This still works on Java 6 Update 29! - Thank you Dorbys for the clear outline on where to put the permission line smiling smiley ... (Vista Business)

Thanks again

Eldodsite -
Hi there Sorry to seem dumb, but I am trying to figure out how to make this work.

Problem is I'm not sure if I'm supposed to just leave the file in User/Mike or if its supposed to go in User/Mike/(a folder)

Also I'm not sure if I'm putting the line in the right place. Is there a space before or after the "permission java.awt.AWTPermission "accessClipboard"; "?

Would really help if someone could post they linn before and after "permission java.awt.AWTPermission "accessClipboard"; " so I can see precisly where it goes as none of this worked for me. sad smiley
Anonymous User
Re: [solved] Online Version smiling smiley Java 6 Copy & Paste Fix
March 30, 2012 07:49AM
Did you already try dobry's answer?
Thank you so much for this tweak!

Just in case anyone is still puzzling about where to place the additional line, these are the bottom few lines of the file I have, after editing:

Quote

permission java.util.PropertyPermission "java.vm.version", "read";
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";
permission java.awt.AWTPermission "accessClipboard";
};

(All the lines begining with 'permission' have a tab indentation at the start but that doesn't show up here.)

It is much easier to do the edit with WordPad, which preserves the formating, rather than NotePad and, of course, it is a *very* good idea to do a backup copy of the file before doing the edit.
steve
Re: [solved] Online Version smiling smiley Java 6 Copy & Paste Fix
November 01, 2012 06:50PM
Awesome! Works through Remote Connections too. I second the idea to use WordPad instead of NotePad as it looks quite garbled without formatting. Also, Windows 7 wouldn't let me name a file .java.policy since it sees a file without a name. I just left off the dot and it was fine.
Are there some advantages of one language C and Java over the other? Which one is optimal? Which one is more "future proof"? Would it be optimal to know both? If so, which order? I am a little confused on the subject. Just got across this course [www.wiziq.com], will it be helpful also. A little enlightenment could help. Thanks
Hello,

I managed to sovle this issue with the .java.policy solution some time ago. However, after upgrading to java 7u45 the java.policy solution is not working for me. I could go back to previous version, but the problem is that java applets were not working with that version because it was out of date, so every time I tried to open an applet a warning popup was displayed and there was no way to make it work.

Any help would be much appreciated
Hello,
I am working on RFID Card Read/Write process. It works for Windows XP but not for Windows 7.
I am having following configuration.
OS : Windows 7.(64 bit)
Java : jdk1.6.0_22 (in program files)
and Java: jre7(in program files*86) for browser plugin.
whenever i access my local jar through command prompt it works, but when i try to access it from browser it doesn't work without any errors.
I have done all above tips and trics.

Thank you in advance.
My platform is Win 7 and I have JRE 7u45. This is not working for me. I have a form which has different html control types like text,checkbox,textarea etc

My JAR file is dually signed and security permissions set. I have also tried the workaround by changing settings in .java.policy file :

// "standard" properies that can be read by anyone permission java.awt.AWTPermission "accessClipboard";

Interestingly enough I can do copy/paste by right click inside my TEXTAREA control but not inside any other control.

Any suggestions/advice?
Hi,

I am unable to delete a character using backspace. To do this what permissions need to be given.
Hello,

I have tried to alter the java.policy file in every way that has been suggested here but it has not worked. I have tried moving and editing the .java.policy file in the User home folder, I have tried editing the original file in the jre7\lib\security folder. I have tried editing the file with Notepad and I have tried editing the file with Wordpad. Nothing has worked. I also tried the method suggested here [www.shodor.org] and this didn't work either. Every time I made one of these changes I restarted my browser and my computer, yet in every case I was still not able to copy/paste between the java applet and programs on my computer (Notepad, Microsoft Word, etc.).

Does anyone have an idea of why none of these methods worked? The only thing I can think of is it has something to do with a change that has been made in Java in the past year or so. Does anyone have an idea of how I can enable copying and pasting without switching to an older version of Java?

Thank you.

Michael
Michael
Re: [solved] Online Version Java 6 Copy & Paste Fix
October 23, 2014 02:58AM
Hello,

I ended up fixing the problem. I'm not 100% sure, but it APPEARS that the only method that worked for me was making a copy of the java.policy file in a different location (I chose my Documents folder), editing that copy of the java.policy file, saving it, deleting the original copy of the java.policy file, and cutting and pasting the new copy of the java.policy file into the Program Files (x86)\Java\jre1.8.0_25\lib\security folder, then restarting the computer.

Making a .java.policy file in the User home folder did NOT work for me. At least, it didn't work until I did what I just described. And doing what I just described but instead doing so with the java.policy file within the jre7 folder did not work either. That's why it looks like what made the difference for me was editing the java.policy file in the jre1.8.0_25\lib\security folder. (And, of course, editing the java.policy file within the actual security folder is not allowed ("Access Denied"), which is why I had to make an extra copy of the policy file in a different folder, edit it, then replace the original java.policy file).

Thanks for all of the suggestions, as they led to the solution for me.

Michael
Author:

Your Email (Optional):


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 12 plus 24?
Message: