• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compiling in windows

 
Chris Davies
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Joe Ess
Bartender
Posts: 9298
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to install a Java SDK (software development kit) and put the <Java SDK Directory>/bin directory in your PATH environment variable.
 
Chris Davies
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9298
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cheers
its working, hadn't closed window.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic