Skip to content

Instantly share code, notes, and snippets.

@ykubota
Created March 9, 2019 13:11
Show Gist options
  • Save ykubota/43930ad9406787946e9827e6bd2babd7 to your computer and use it in GitHub Desktop.
Save ykubota/43930ad9406787946e9827e6bd2babd7 to your computer and use it in GitHub Desktop.
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