4
This is my first post here on the stack, I’m having a hard time running this class in Netbeans. I’m using version 1.8.0_40 of Java, I’ve tried searching for some solution, but I can’t find.
public class Dialog1 {
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
// TODO code application logic here
JOptionPane.showMessageDialog(null, "Bem Vindo ao Java");
}
}
when compiling this class it even gives as a success, but gives an error message
run: Error: Unable to locate or load main class dialog1.Dialog1 Java Result: 1 BUILT SUCCESSFULLY (total time: 1 according to)
Does anyone know what might be going on?
This error seems to be related to project configuration, if you created a Java project, see in the properties if it is set correctly to correct jre for execution.
– Celso Marigo Jr
I suggest trying to run the script from the command line. If you have no problems from the command line, it is something in the IDE itself.
– mutlei