FileDocCategorySizeDatePackage
AccessTest.javaAPI DocExample524Sat Jan 13 12:18:10 GMT 2001javasec.samples.ch05

AccessTest

public class AccessTest extends Applet

Fields Summary
Constructors Summary
Methods Summary
public voidinit()

        SocketPermission sp = new SocketPermission(
                            getParameter("host") + ":6000", "connect");
        try {
            AccessController.checkPermission(sp);
            System.out.println("Ok to open socket");
        } catch (AccessControlException ace) {
            System.out.println(ace);
        }