Have tried solutions given on many threads but not able to figure out what's wrong with my code:
B.java is at C:\com\check2\pkgs2\B.java
System PATH = C:\Program Files\Java\jdk1.7.0_51\bin;
CMD Status :
C:\>echo %CLASSPATH%
%CLASSPATH%
C:\>javac com\check2\pkgs2\B.java
C:\>java com\check2\pkgs2\B.class
Error: Could not find or load main class com\check2\pkgs2\B.class
B.java is getting compiled successfully and .class is getting created. but not able to execute. What is the problem? Please help me out.
OS: Windows 7
Java version: 1.7.0_51
Java(TM) SE Runtime Environment: build 1.7.0_51-b13