Created
March 9, 2019 13:11
-
-
Save ykubota/43930ad9406787946e9827e6bd2babd7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.sun.naming.internal.ResourceManager; | |
public class SecurityModule extends SecurityManager { | |
@Override | |
public void checkPackageAccess(String pkg) { | |
super.checkPackageAccess(pkg); | |
} | |
@Override | |
public void checkPackageDefinition(String pkg) { | |
super.checkPackageDefinition(pkg); | |
} | |
public static void main(String[] args) throws Exception { | |
final SecurityModule securityManager = new SecurityModule(); | |
System.setSecurityManager(securityManager); | |
ResourceManager.getInitialEnvironment(null); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment