You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EarthIAm edited this page Jan 6, 2020
·
2 revisions
private static Class findAccessControllerClass() {
try
{
// This Class was introduced in JDK 1.2. With the re-architecture of
// security mechanism ( starting in JDK 1.2 ), we have option of
// giving privileges to certain part of code using doPrivileged block.
// In JDK1.1.X applications won't be having security manager and if
// there is security manager ( in applets ), code need to be signed
// and trusted for having access to resources.
return Class.forName("java.security.AccessController");
}
catch (Exception e)
{
//User may be using older JDK ( JDK <1.2 ). Allow him/her to use it.
// But don't try to use doPrivileged
}
return null;NULL
}