Following is the part of my error. Because of this error my applet isn't initialized. The following code is part of the init() method:
Socket sock; try { sock = new Socket("localhost", 1307); out = new PrintWriter(sock.getOutputStream(), true); in = new BufferedReader(new InputStreamReader(sock.getInputStream())); } catch (UnknownHostException e) { } catch (IOException e) { }
I m getting the following error:
java.security.AccessControlException: access denied (java.net.SocketPermission 1 127.0.0.1 resolve) at java.security.AccessControlContext.checkPermission(AccessControlConte xt.java:323) at java.security.AccessController.checkPermission(AccessController.java: 546) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at java.lang.SecurityManager.checkConnect(SecurityManager.java:1031) at java.net.InetAddress.getAllByName0(InetAddress.java:1145) at java.net.InetAddress.getAllByName(InetAddress.java:1083) at java.net.InetAddress.getAllByName(InetAddress.java:1019) at java.net.InetAddress.getByName(InetAddress.java:969) at java.net.InetSocketAddress.(InetSocketAddress.java:124) at java.net.Socket.(Socket.java:186) at Alice.init(Alice.java:103) at sun.applet.AppletPanel.run(AppletPanel.java:424) at java.lang.Thread.run(Thread.java:619)
I am running another program on another JVM. I am trying to connect both using 1307 port on localhost.