RMISecurityManager@Deprecated(since="17", forRemoval=true) public class SecurityManager extends Object
| Constructor | Description |
|---|---|
SecurityManager() |
Deprecated, for removal: This API element is subject to removal in a future version. Constructs a new SecurityManager. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
checkAccept |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkAccess |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkAccess |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkConnect |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkConnect |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkCreateClassLoader() |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkDelete |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkExec |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkExit |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkLink |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkListen |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkMulticast |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkMulticast |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkPackageAccess |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkPackageDefinition |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkPermission |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkPermission |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkPrintJobAccess() |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkPropertiesAccess() |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkPropertyAccess |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkRead |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkRead |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkRead |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkSecurityAccess |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkSetFactory() |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkWrite |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
void |
checkWrite |
Deprecated, for removal: This API element is subject to removal in a future version. Throws SecurityException. |
protected Class<?>[] |
getClassContext() |
Deprecated, for removal: This API element is subject to removal in a future version. Returns the current execution stack as an array of classes. |
Object |
getSecurityContext() |
Deprecated, for removal: This API element is subject to removal in a future version. Returns an AccessControlContext where the checkPermission method always throws an AccessControlException and the getDomainCombiner method always returns null. |
ThreadGroup |
getThreadGroup() |
Deprecated, for removal: This API element is subject to removal in a future version. Returns the current Thread's ThreadGroup. |
public SecurityManager()
SecurityManager. Setting a security manager with System.setSecurityManager(SecurityManager) is not supported.protected Class<?>[] getClassContext()
The length of the array is the number of methods on the execution stack. The element at index 0 is the class of the currently executing method, the element at index 1 is the class of that method's caller, and so on.
StackWalker class can be used as a replacement for this method.public Object getSecurityContext()
AccessControlContext where the checkPermission method always throws an AccessControlException and the getDomainCombiner method always returns null.AccessControlContext that fails all permission checks. The Security Manager is no longer supported. There is no replacement for the Security Manager or this method.AccessControlContext as specified abovepublic void checkPermission(Permission perm)
SecurityException.perm - ignoredSecurityException - alwayspublic void checkPermission(Permission perm, Object context)
SecurityException.perm - ignoredcontext - ignoredSecurityException - alwayspublic void checkCreateClassLoader()
SecurityException.SecurityException - alwayspublic void checkAccess(Thread t)
SecurityException.t - ignoredSecurityException - alwayspublic void checkAccess(ThreadGroup g)
SecurityException.g - ignoredSecurityException - alwayspublic void checkExit(int status)
SecurityException.status - ignoredSecurityException - alwayspublic void checkExec(String cmd)
SecurityException.cmd - ignoredSecurityException - alwayspublic void checkLink(String lib)
SecurityException.lib - ignoredSecurityException - alwayspublic void checkRead(FileDescriptor fd)
SecurityException.fd - the system-dependent file descriptorSecurityException - alwayspublic void checkRead(String file)
SecurityException.file - ignoredSecurityException - alwayspublic void checkRead(String file, Object context)
SecurityException.file - ignoredcontext - ignoredSecurityException - alwayspublic void checkWrite(FileDescriptor fd)
SecurityException.fd - ignoredSecurityException - alwayspublic void checkWrite(String file)
SecurityException.file - ignoredSecurityException - alwayspublic void checkDelete(String file)
SecurityException.file - ignoredSecurityException - alwayspublic void checkConnect(String host, int port)
SecurityException.host - ignoredport - ignoredSecurityException - alwayspublic void checkConnect(String host, int port, Object context)
SecurityException.host - ignoredport - ignoredcontext - ignoredSecurityException - alwayspublic void checkListen(int port)
SecurityException.port - ignoredSecurityException - alwayspublic void checkAccept(String host, int port)
SecurityException.host - ignoredport - ignoredSecurityException - alwayspublic void checkMulticast(InetAddress maddr)
SecurityException.maddr - ignoredSecurityException - alwayspublic void checkMulticast(InetAddress maddr, byte ttl)
SecurityException.maddr - ignoredttl - ignoredSecurityException - alwayspublic void checkPropertiesAccess()
SecurityException.SecurityException - alwayspublic void checkPropertyAccess(String key)
SecurityException.key - ignoredSecurityException - alwayspublic void checkPrintJobAccess()
SecurityException.SecurityException - alwayspublic void checkPackageAccess(String pkg)
SecurityException.pkg - ignoredSecurityException - alwayspublic void checkPackageDefinition(String pkg)
SecurityException.pkg - ignoredSecurityException - alwayspublic void checkSetFactory()
SecurityException.SecurityException - alwayspublic void checkSecurityAccess(String target)
SecurityException.target - ignoredSecurityException - alwayspublic ThreadGroup getThreadGroup()
ThreadGroup.ThreadGroup
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityManager.html