4/4/12



COMPILING AND RUNNING YOUR JAVA FILES USING COMMAND PROMPT (CMD WINDOW) – for WINDOWS

4/04/2012


Step 1:
a.       Go to Start Menu -> Click ‘Run’ or
b.    Press Window Logo on your keyboard + R
*If you can’t find  the ‘Run’ on your Start Menu, right click the ‘Start Menu logo’ à Properties à choose ‘Customize’ button à put a tick on ‘Run command’ and hit OK and ‘Apply’.
Step 2:
                Type ‘cmd’ on the Run window.











Step 3:
                The command window will appear after.
a.       Type: cd C:\java\bin                                    to go to the directory  C:\java\bin> where your
java files (.java) are saved.   

b.       Compiling your java file. This will create a .CLASS file when compiling is done               . 

Type this:
javac myJavaFile.java       

*If no errors were found, proceed to running your java file.
*In compiling your java program, always remember that it translates the code line by line.

             c.       Running your java file.
Type,

 java myJavaFile.java



*Java is case-sensitive;
*Don’t forget to include the file extension (.JAVA) of your java file when compiling and running them.




Your thoughts about this post? Leave a commment now.

Posted by

AndyFGo : A place for Pinoy Music News. Lyrics. Music Videos. Pinoy Movie/Foreign Trailers. OPM.

 

© 2013 andyfgo. All rights reserved. Designed by Templateism. Powered by Blogger
Protected by Copyscape DMCA Takedown Notice Violation Search

Back To Top