PDA

Click to See Complete Forum and Search --> : how to compile java program


ishikha
Jul 30th, 2002, 04:41 AM
plz tell me how we compile java program

Dillinger4
Jul 30th, 2002, 02:51 PM
You have to first navigate to C:\jdk\1.3 to run the compiler and interpreter unless you set it to be otherwise.

To compile from DOS -> C:\jdk1.3\bin> javac C:\YourDirectory\App.java

To run -> C:\jdk1.3\bin> java -classpath C:\YourDirectory; App

If you have the CLASSPATH variable set in the autoexec.bat then you can just omit the -classpath switch.

Virtual24
Oct 18th, 2002, 04:30 PM
Also, If you add this line 'c:\jdk1.3\bin;' to the 'path' line in your autoexe.bat file (located on the c: drive) then all you have to do is go to C: in the command prompt, and type autoexec. Then you can use your compiler program (javac) anywhere.

Dillinger4
Oct 18th, 2002, 11:47 PM
Is there an echo in here? :confused: