• Register
0 votes

Problem :

I am trying to create a file in a folder but I am getting exception as

java.security.AccessControlException:Access denied
6.9k points

1 Answer

0 votes

Solution :

Please try adding

<jre location>\lib\security\java.policy

grant { permission java.security.AllPermission; };

And check if it allows you. If allowed then you will have to add more permissions.

Further Readings:

Java 8 Documentation for java.policy files


36.1k points
edited by

Related questions

0 votes
1 answer 8 views
0 votes
0 answers 25 views
There is a 3d printing software by python computer is connect to printer via usb port and it sends data to printer by pyserial if any sniffer software sniffs it..i want to stop data sending to protect data
asked Oct 6, 2019 Genius Y
0 votes
1 answer 3 views
Problem : I have only fundamental knowledge related to security certificates. I am repeatedly facing a very annoying error message while trying to use the certificate to decrypt the data. Here I am trying to create the self-signed certificate as I need to use it to ... of time and efforts in trying to fix the above issue by myself. Can I programmatically grant the access to use this certificate?
asked Aug 8 Raphael Pacheco 3.2k points
0 votes
1 answer 30 views
1 vote
1 answer 7 views
Problem: Hello Kodlogs, I am a new Java programmer. I am practicing Java I/O file handling. I&rsquo;ve written a Java program to take input a file from my computer. I&rsquo;ve created a file on my desktop and reading it through my these codes: import java ... the program and it's producing an error Exception in thread "main" java.io.FileNotFoundException: file.txt Any idea to overcome this issue?
asked Jun 17 adamSw 11.3k points