Hello,
I made a client-server based multiplayer game with
java. When I run the client in eclipse it works fine. But when I run the game in a browser I got this error:
c:\**********>Appletviewer -J-Dos400.awt.native=true -J-Djava.version=1.5 launch.html
Exception in thread "Thread-5" java.security.AccessControlException: access denied (java.net.SocketPermission ***ip*****:7777 connect,resolve)
at java.security.AccessControlContext.checkPermission(AccessControlContext.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:1034)
at java.net.Socket.connect(Socket.java:524)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at net.Connection.send(Connection.java:22)
at client.Castle.run(Castle.java:83)
at java.lang.Thread.run(Thread.java:662)
How can I solve this?