can't compile a java program.

Status
Not open for further replies.

virus_killer

Journeyman
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

Think Zen.
Your path doesnt contain javac.

Refer this : *java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html
 

Bandu

Journeyman
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.
 

sanprince

Broken In
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

Wahahaha~!
Staff member
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
 
Status
Not open for further replies.
Top Bottom