Applet Error!!! Please help

Recently, Im working on a school major project about Java networking game, Im doing the server-client applet that can work over the network, but fail. It shows the following error:

java.security.AccessControlException: access denied (java.net.SocketPermission 152.226.136.91:5001 connect,resolve)

What can be done to the above error? Please help, its extremely urgent!!!Thanks in advance.

(Please note that I have to use Java 2 to create the applets and I am using Windowx XP)

Applets run in a security sandbox that only allows them to open sockets to the server they were downloaded from.

It looks as though you might be running afoul of this.

How-to sign applets

http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/rsa_signing.html

If you can’t afford a certificate, you can use a self-signed version (with a big warning at the first dowload of your applet).

Once signed, your applet has full control of the PC (hence the warning).