Hi, I am using an FTP code as an Applet. The applet will try to connect to the domain where the applet came from. I alsoo get my jar file signed with the following command: jarsigner -keystore ftpstore -storepass ftppwd -keypass ftppwd -signedjar ftpsigned.jar ftp.jar ftp
So when I run the applet, it prompt me to grant. So I grant it.
So what the applet is trying to do is to: 1. connect (successful) 2. list directory (with system.out.println) (successful) 3. upload a file to the ftp server (UNsuccessful)
The error was: java.security.AccessControlException: access denied (java.io.FilePermission C:\test2t.txt read)
So I tried to edit my java.policy file and append the following line: permission java.io.FilePermission "c:\\test2.txt", "read,write,execute,delete";
Then I restart my web server but the error still persist...
I think u r modifying a wrong policy file. U shld be modifiying the security.policy file.
Do it this way.
Create a file policy.txt with the following contents: ******************************************************** grant { permission java.security.AllPermission "", ""; }; **********************************************
execute the class with the following options :
java -Djava.security.policy=policy.txt <class name >
This shld help.
IF something still persists, give me a mail at naveen.lade@polaris.co.in