File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes java path settings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java path settings" Watch "java path settings" New topic

java path settings

Hema Sujith

Joined: Jun 27, 2003
Posts: 1
Hi folks,
I am new to java.I am really confused with path settings.I am getting an error as ..."javac is not recognized as an external or internal command, operable program or batch file".
I am having windowsXP and I downloaded
J2SE v 1.4.1_03.I gave path as " c:\program files\java\j2re1.4.1_03\bin".And also created my simple java program in bin directory.But I am getting the above error.Actually I installed java in c:\java folder.When I check I found all bin,lib folders are in 'program files'.So I gave the path like that.I don't know all these...I really confused about this.I would appreciate it,if you guys help me in this regard.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Chinni,
Welcome to JavaRanch, the absolute best site on the www for Java information. We don't have many rules around here, but we do have one. Please change your display name to a first and last name to comply with the JavaRanch Naming Policy. You can change it here. Thank you for your cooperation.
You need to set the PATH variable in XP. Take a look at this
thread and see if that helps.

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
bharat nagpal
Ranch Hand

Joined: Oct 26, 2002
Posts: 76
first open commnd window
write path=%path%;c:\java\bin
now try to execute will run.
This path will be set for the current dos window.
For permanently setting the path
go to
Start - Control Panel - System - Advanced Tab - Environment Variables
and add c:\java\bin; in in the start of PATH variable value.
I agree. Here's the link:
subject: java path settings
It's not a secret anymore!