I saved my java file in d:\Vnew
.
Compiled it from other folder(C:\>javac d:\Vnew\Vsimple.java
) in command prompt which works fine.
But when I try to run (C:\>java d:\Vnew\Vsimple
),getting below error:
Error: Could not find or load main class d:\Vnew\Vsimple Caused by: java.lang.ClassNotFoundException: d:\Vnew\Vsimple
Note: If I run from same folder, d:\Vnew
, it works fine.
What could be the reason?