Running java from command prompt

by Ramya 2009-05-28 18:08:51

Running Java from command prompt:

Go to start->Run and type cmd.
Move to the directory which contains your Java Program.(for eg, E:/ cd java_pgm).
Set the path of JDK as "set path=%path%;D://Program Files//Java//j2sdk//bin"(j2sdk or jdk).
Compile your java program by "javac test.java".
Finally run your code "java test.java".

Tagged in:

1720
like
1
dislike
0
mail
flag

You must LOGIN to add comments