I am new to Java. I wrote a simple program that prints "Hello World". My program compiled but did not run but gave me this exception:
Exception in thread main java.lang.NoClassDefFoundError:Hello wrong name : main hello
My program is like so:
package main;
public class Hello
{
public static void main(String[] args)
{
System.out.println("Hello World");
}
}
My program is in: \main\Hello.java I searched so much and compiled in different ways but i don't understand what the problem is. Can anyone help me?