DIGIT-ARC read-only archive · snapshot: July 23, 2026

can't compile a java program.

7 posts · originally from https://geek.digit.in/community/threads/cant-compile-a-java-program.97159/

virus_killer
virus_killer Original post #1
Sep 5, 2008 at 12:14 PM
Guys,

I have got a java program. its about multi threaded server. i am getting an error message while compiling this program. i have installed JDK 6.0 in my laptop.

here how i compile the program.

c:\Users\me> javac WebServer.java

and this is an error message what i am getting.

' javac' is not recongnized as aninternal or external command, operable program or batch file. '

Am i doing anything wrong here?

please help me guys, here is the code *rafb.net/p/vUXfk953.html, please compile this code and tell me if its working fine or not.
ray|raven
Sep 5, 2008 at 12:17 PM
Your path doesnt contain javac.

Refer this : *java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html
virus_killer
Sep 5, 2008 at 12:30 PM
^^ please check your inbox.
B
Bandu #4
Sep 5, 2008 at 7:40 PM
Your path doesnt contain javac.

His problem is not the CLASSPATH. He has to set his PATH correctly. Your link talks about CLASSPATH

I could download your code and compile it successfully. Refer my screenshot for how to set the PATH variable.

*i35.tinypic.com/2lih73m.jpg

^The error "Der Befel... blah blah..." reads the same as yours, but in German.

I am not sure about XP or Vista. I am using Windows 2000 (in office). Here, you can permanently modify your PATH to point to the Java installation\bin folder. All I do is go to Environment settings, Environment variables, and Edit the PATH variable. Must be something similar on XP / Vista.

Regards,
Bandu.
S
Sep 6, 2008 at 4:21 AM
yes, bandu is right .. in winxp, environmental variables has to be set,
right click my computer-->properties--> advanced tab --->environment variables button @ the bottom. --> in tat edit the 'path' in system variables. i.e just add the location of the /bin folder of your java folder after a semicolon of watever is there. ..
Faun
Faun #6
Sep 6, 2008 at 4:45 AM
Here is a step by step click and clickty way i wrote in my blog:
*visio159.com/2008/01/03/a-beginners-appraoch-to-java/

Its the same method but the GUI way
virus_killer
Sep 6, 2008 at 11:49 AM
Thanks guys, solved it.