I have been facing this simple issue yet not able to fix this. Getting this error both in eclipse as well as while running from command prompt.
This question is asked many times here I know, but didn't quiet get the solutions from any of those.
Just trying to understand things. Here is this simple to try program which I have.
package com;
public class Test {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Hellooooooo");
}
}
In eclipse I get this Error: Could not find or load main class com.Test
Now when I try from command Prompt.
C:\workSpaceLatest\Test\src\com>java Test
Error: Could not find or load main class Test
When I run C:\workSpaceLatest\Test\src\com>javac Test.java
no Error also no Output
But in IntelliIDEA it works fine. why is it so. Someone help me understand this for once.
**P.S : Point me to any posts or questions which has best answer. I haven't found any though.