Link to home
Start Free TrialLog in
Avatar of Reggie_BE
Reggie_BE

asked on

Access denied :\

Hi,

I'm learning Java using JCreator.
I've made some little thing that resolves a hostname.

I get the following error:
java.security.AccessControlException: access denied (java.net.SocketPermission www.reggie.be resolve)

This is the code:

import java.awt.*;
import java.applet.*;
import java.net.InetAddress;
import java.net.UnknownHostException;


public class MSN extends Applet {
     
     public void init() {
          System.out.println("Initializing program ...");
          InetAddress address = null;
          try {
               address = InetAddress.getByName("www.reggie.be");
          } catch(UnknownHostException e) {
               e.printStackTrace();
               return;
          }
          System.out.println("IP:" + address.getHostName());
         
          return;
     }
}

ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Reggie_BE
Reggie_BE

ASKER

ohw, but how c
how can I do this then ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
For fundamental knowledge about code signing go here:

http://java.sun.com/docs/books/tutorial/security1.2/toolsign/signer.html


Any question, let me know.
Reggie_BE:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
SPLIT between CEHJ and orangehead911

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Thomas Boshell
EE Cleanup Volunteer