# SocketPermission

Girasoli, Tony (girasoli@datacomm.uconn.edu)
Thu, 29 Oct 1998 08:33:55 -0500

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: JDCNewsletter@Sun.com: "JDC Newsletter Vol. 2 No. 2"
- Previous message: Bernd Küppers: "Help: Reading local file with applet in classpath"
- Next in thread: Jan Luehe: "Re: SocketPermission"

Hello,

I am running JDK1.2beta4 on NT 4.0sp4. I am trying to run some code
that basically does SNMP gets and sets. The program compiles fine, but
when the program is executed, and tries to connect to a host (in this
case, 137.99.89.4 port 161), I get this error:

java.security.AccessControlException: access denied
(java.net.SocketPermission 1
37.99.89.4:161 connect,resolve)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at
java.lang.SecurityManager.checkConnect(SecurityManager.java:797)
at java.net.Socket.<init>(Socket.java:208)
at java.net.Socket.<init>(Socket.java:165)
at snmp.SnmpContext.<init>(SnmpContext.java:142)
at get_one.init(get_one.java:39)
at sun.applet.AppletPanel.run(Compiled Code)
at java.lang.Thread.run(Thread.java:475)

Do I need to add some permissions in my code?

Thank you for any help.

Tony Girasoli
Network Communications Consultant
University of Connecticut
U-138
girasoli@datacomm.uconn.edu

- Next message: JDCNewsletter@Sun.com: "JDC Newsletter Vol. 2 No. 2"
- Previous message: Bernd Küppers: "Help: Reading local file with applet in classpath"
- Next in thread: Jan Luehe: "Re: SocketPermission"