This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes compiling in windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "compiling in windows" Watch "compiling in windows" New topic
Author

compiling in windows

Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
hi
when i type javac from the windows promt i get an error saying its not recognised as an internal/external command or batch file.
i've got catalin_home and classpath set as environmnet variables - do i have to be in specific directory within the jdk for compilation to work ?
cheers
chris


One day all greenhorns will run free ...
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8876
    
    8

You have to install a Java SDK (software development kit) and put the <Java SDK Directory>/bin directory in your PATH environment variable.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
cheers
i've set the PATH variable (win2000 pro) to C:\j2sdk1.4.0_02\bin and its still giving me the same error when i try to compile a class in a directory.
any ideas ?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8876
    
    8

Did you happen to set the PATH after you opened your command prompt window? The settings don't automatically refresh. You have to close that window and open a new command prompt. If you have the bin directory in the path, javac should work anywhere. Run "set" and see what the PATH is really set to.
Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
cheers
its working, hadn't closed window.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: compiling in windows