Step 1: Go
to command prompt (or type cmd in Run Dialog box).
Step 2: Set the path as the location of the
bin directory of java which is located in the program file directory.
In my case path
= C:\Program Files\Java\jdk1.7.0_01\bin
Step 3: Now change directory to the location
where source code is residing.
Step 4: After that time to compile java
program. You need to type following commands: -
javac source_code.java (
for compilation, if successfully compiled then program is ready to execute)
java
source_code (for
execution)
Comments
Post a Comment