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
1 changed files with 10 additions and 4 deletions

View File

@ -178,10 +178,16 @@ public class BytecodeViewer
System.out.println(" - Created by @Konloch");
System.out.println("https://bytecodeviewer.com - https://the.bytecode.club");
//set the security manager
System.setSecurityManager(sm);
// Set the security manager
try {
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
{
//precache settings file