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 environment variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "environment variables" Watch "environment variables" New topic

environment variables

Anurag Malaviya

Joined: Jul 01, 2009
Posts: 19

Can anyone please let me know how to set the path for java

I know this can be done be done by creating an environment

variable. but its not working

Thanks in advance
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3902

Tell us what have you tried and how? Normally you should add a environment variable called path (if not exist already) and add an entry which points to the bin directroy of your java installation.

[How to ask questions] [Twitter]
David Newton

Joined: Sep 29, 2008
Posts: 12617

What OS?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15082

The JDK installation instructions explain exactly what you should do (look at step 4, "Updating the PATH variable").

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11955

David has a very important question. How you set an environment variable is dependent on what operating system you use. it won't help for someone to give you directions on how to do it in Unix when you are running Mac OS X. it is important to tell the details.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
I agree. Here's the link:
subject: environment variables
jQuery in Action, 3rd edition