Example usage for java.lang SecurityManager getSecurityContext

List of usage examples for java.lang SecurityManager getSecurityContext

Introduction

In this page you can find the example usage for java.lang SecurityManager getSecurityContext.

Prototype

public Object getSecurityContext() 

Source Link

Document

Creates an object that encapsulates the current execution environment.

Usage

From source file:Main.java

public static void main(String[] args) {

    System.setProperty("java.security.policy", "file:/C:/java.policy");

    SecurityManager sm = new SecurityManager();

    System.setSecurityManager(sm);

    Object con = sm.getSecurityContext();

    System.out.println(con);//ww w .j  a  va2s. c  om

}