wood burning stoves*
The moose likes JNLP and Web Start and the fly likes java.security.AccessControlException:access denied (java.net.SocketPermission ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "java.security.AccessControlException:access denied (java.net.SocketPermission ..." Watch "java.security.AccessControlException:access denied (java.net.SocketPermission ..." New topic

java.security.AccessControlException:access denied (java.net.SocketPermission ...

bill zhang

Joined: Jul 08, 2009
Posts: 8
I have a swing program needs to access db which resides on on port 1521.
I signed the program and policy file looks like:

grant signedBy "susan" {
permission java.io.FilePermission "C:\\Backup\\SignJarTest\\*", "read";
permission java.net.SocketPermission "", "listen,accept,connect,resolve";

If I remove FilePermission from the policy, program throws error on opening a config file. So fist setting solves this problem. However no matter what I do with the second setting for Socket Permission, it keeps giving me error when I run the program:
java.security.AccessControlException:access denied (java.net.SocketPermission connect, resolve.
Can someone tell me why? Thanks.
Vishalkumar srivastava

Joined: Jul 16, 2009
Posts: 2
use the port no. also as shown below

permission java.net.SocketPermission "", "listen,accept,connect,resolve";
Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2716

"Vishal India " please check your private messages. You can check them by clicking the My Private Messages link above.

|Asking Good Questions|
subject: java.security.AccessControlException:access denied (java.net.SocketPermission ...
Similar Threads
Java2 Security Permissions
Failing applet connection with (SSL) https connection using proxy
RMI Server Connection Problem on XP prof
Why does AccessControlException happen? Please help me!