[java] What does "Could not find or load main class" mean?

After searching for 2 days I found this solution and this works. It is pretty weird but it works for me.

package javaapplication3;
public class JavaApplication3 {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
    // TODO code application logic here
    System.out.println("Hello");
}

}

this is my program i want to run that locates at C:\Java Projects\JavaApplication3\src\javaapplication3

Now open cmd on this location and compile program using this command

javac JavaApplication3.java

After compiling navigate one directory down i.e. C:\Java Projects\JavaApplication3\src

now run following command to execute program

java javaapplication3.JavaApplication3

Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to class

String method cannot be found in a main class method Class constructor type in typescript? ReactJS - Call One Component Method From Another Component How do I declare a model class in my Angular 2 component using TypeScript? When to use Interface and Model in TypeScript / Angular Swift Error: Editor placeholder in source file Declaring static constants in ES6 classes? Creating a static class with no instances In R, dealing with Error: ggplot2 doesn't know how to deal with data of class numeric Static vs class functions/variables in Swift classes?

Examples related to main

String method cannot be found in a main class method How to access global variables Maven Error: Could not find or load main class Eclipse error "Could not find or load main class" Error: Main method not found in class Calculate, please define the main method as: public static void main(String[] args) What does "Could not find or load main class" mean? C# importing class into another class doesn't work In Python, can I call the main() of an imported module? Can there exist two main methods in a Java program? Could not find or load main class with a Jar File