Workaround for SecurityManager stuff on Java 18+

This commit is contained in:
Nico Mexis 2022-04-01 12:24:02 +02:00
parent 82e11e72e3
commit 3a5fd2a3c9
No known key found for this signature in database
GPG key ID: 27D6E17CE092AB78

View file

@ -179,8 +179,14 @@ public class BytecodeViewer
System.out.println(" - Created by @Konloch"); System.out.println(" - Created by @Konloch");
System.out.println("https://bytecodeviewer.com - https://the.bytecode.club"); System.out.println("https://bytecodeviewer.com - https://the.bytecode.club");
//set the security manager // Set the security manager
try {
System.setSecurityManager(sm); System.setSecurityManager(sm);
} catch (Throwable t) {
System.err.println("Cannot set security manager! Are you on Java 18+ and have not enabled support for it?");
System.err.println("Because of this, you may be susceptible to some exploits!");
System.err.println("Either deal with it or allow it using the -Djava.security.manager=allow parameter.");
}
try try
{ {