Two Laptop Bag*
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 Android Security Essentials Live Lessons this week in the Android 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: 8843
    
    7

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: 8843
    
    7

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.
 
wood burning stoves
 
subject: compiling in windows
 
Similar Threads
Survey- What platform do you use to program in Java?
Colon in FileName
How to start Tomcat?
not able to set environment variables, HFSJ- beer example
google gone mad...