java.lang.SecurityException:Prohibited Package Name:java
At Java.lang.ClassLoader.preDefineClass (classloader.java:479)
At Java.lang.ClassLoader.defineClassCond (classloader.java:625)
At Java.lang.ClassLoader.defineClass (classloader.java:615)
At Java.security.SecureClassLoader.defineClass (secureclassloader.java:141)
At Java.net.URLClassLoader.defineClass (urlclassloader.java:283)
At java.net.urlclassloader.access$000 (urlclassloader.java:58)
At Java.net.urlclassloader$1.run (urlclassloader.java:197)
At java.security.AccessController.doPrivileged (Native Method)
At Java.net.URLClassLoader.findClass (urlclassloader.java:190)
At Java.lang.ClassLoader.loadClass (classloader.java:306)
At Sun.misc.launcher$appclassloader.loadclass (launcher.java:301)
At Java.lang.ClassLoader.loadClass (classloader.java:247)
Exception in thread "main"
The interesting exception that came up just now was that I defined my Code package as Java, which is what happens when I run the class under the package.
As can be seen from the stack information of the exception, this is the ClassLoader (ClassLoader) encountered a problem while conducting security checks.
The solution to this problem is, of course, very simple, so just change the name of the package. After all, you also need the ClassLoader to work.
Java.lang.SecurityException