Java Programs can be compiled from the windows promt without any hassels. This is often used by many experienced java developers and professionals. However, For those who have never used this, Below are the steps involved to compile a java program using windows CMD.


1). Click the windows icon and open the command prompt. You can do this by either typing CMD on the search panel of the windows 7 also. 

2). Go to the desired folder/project where you have kept all your Java Files, which are supposed to get compiled. For eg. Point the directory to  cd c:\\CustomerPortal\Java\

3). Type in javac <JavaFileName>. Replace this with the name of you Java File. Remember to include the extension .java along with the filename.

4). If you get an error , make sure that you have set the path of the java in the environment variable.

5).After successfull compilation, You will see a '.class' file created in the same folder.


Sandeep Joshi
Mathematics, Technology and Programming are my passion. I am a part of Java Ecosystem and through this blog, I contribute to it. I am here to blog about my interests, views and experiences.
I am on Google+ and Facebook.
I feel proud to be listed as a "National Memory Record Holder" in the Limca Book of Records, 2009 and have attempted for an International Memory record in the Guiness Book of Records. I can remember the value of PI upto 10,000 digits after the decimal (3.1415.....). You can contact me on ; I would like to hear from you :)