Adding Javac to Environment Variable in XP

Hi.

I have installed Java SDK 1.5 and Textpad.

However, as I am trying to add javac to the environment variable in XP, after entering the name as "javac" and variable path as "C:\Java\jdk1.6.0_20\bin". When I go to the command prompt, and type in javac, it comes out with an error;

'javac' is not recognized as an internal or external command,
operable program or batch file.

ps. using textpad, I could add special commands that enables me to compile and run java files (using Ctrl + 1 and 2) but using plain command prompt, unless I go to the bin folder it does not work.

Please help.

Brgds
Imran
imamdaniAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wannabetechieCommented:
Add the "C:\Java\jdk1.6.0_20\bin" to your Path variable in the System variables section rather than creating a new variable
0
imamdaniAuthor Commented:
When you say add, does it not mean creating a new variable.

Nevertheless, I deleted the previous entry from user variables, and added a new variable in the system variable section.
Name: javac
Value: C:\Java\jdk1.6.0_20\bin

Still does not work.

0
VenabiliCommented:
You do not need to declare javac as a variable - it is a command.

As wannabetechie says - just add the path to the bin folder in the PATH variable.

See http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html and especially "4. Update the PATH variable (Optional) " for exact instructions and details.

And you can always use the full path to the javac command of course.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

VenabiliCommented:
>When you say add, does it not mean creating a new variable.

Nope, it just means to add a value to the already existing PATH. If it is not there, then create it but it should be there.
0
imamdaniAuthor Commented:
ah, i was thinking PATH is something I had to add. such a duff!
Thanks guys for clearing this out.
0
imamdaniAuthor Commented:
..
0
VenabiliCommented:
:) If you had never dealt with the variable, I can understand the confusion :)

Good luck with your Java studies.
0
imamdaniAuthor Commented:
Thanks matey.
:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.