jQuery in Action, 2nd edition*
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 3816

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

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 7 API documentation
Scala Notes - My blog about Scala
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11153

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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: environment variables
Similar Threads
Http session across multiple EARs
getting and setting environment variables
Get handle of UserRegistry or JAAS entries in WAS
Question to Scott Ambler
how to set environment vars ?