Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java.security.Access.ControlException: access denied

 
Fernando Skackauskas
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Guys,

I have the follow problem:

I have a Java programm that receives via Applet a binary file and read that file with java.io.FileInputStream().

First, when I was running the program, was occuring the message error:

Java.security.Access.ControlException: access denied("java.io.FilePermission" "[object file]" "read")

I created a key via keytool and signed the jar file with jarsigner.

But, even executing the command jarsigner, when I run the java program, the mensage error continues occuring:

Java.security.Access.ControlException: access denied("java.io.FilePermission" "[object file]" "read").

What must I to do?

Thanks,

Fernando Skackauskas
 
Paul Clapham
Sheriff
Posts: 21961
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure you're running the signed applet in your HTML. Browsers have a habit of caching things, including applets, so the message might still be coming from a cached version of the unsigned applet. Clear your browser cache and so on.

And can I assume you are using a self-signed certificate and not one which you bought from a well-known certificate supplier? In that case you should be getting a message from the browser "Are you sure you want to run this?" when it tries to load your signed applet.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!