Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.SecurityException: Prohibited package name: java.pilha at java.lang.ClassLoader.preDefineClass(ClassLoader.java:662) at java.lang.ClassLoader.defineClass(ClassLoader.java:761) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:368) at java.net.URLClassLoader$1.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:361) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495) /Users/anon/Library/Caches/NetBeans/8.2/executor-snippets/run.xml:53: Java returned: 1
package java.pilha;
import java.util.*;
public class Fluxo {
public static void main(String[] args) {
System.out.println("Ini do main");
metodo1();
System.out.println("Fim do main");
}
private static void metodo1() {
System.out.println("Ini do metodo1");
metodo2();
System.out.println("Fim do metodo1");
}
private static void metodo2() {
System.out.println("Ini do metodo2");
for(int i = 1; i <= 5; i++) {
System.out.println(i);
}
System.out.println("Fim do metodo2");
}
}