aspose file tools*
The moose likes Beginning Java and the fly likes Where do I enter environment parms ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Where do I enter environment parms ?" Watch "Where do I enter environment parms ?" New topic
Author

Where do I enter environment parms ?

Eva Coppola
Greenhorn

Joined: Jul 28, 2010
Posts: 10
I've got the PATH information that I need to set, however I have no idea where to set them. Thankyou
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 19059
    
  40

Well, it depends on the operating system. And depends on the shell that you are using in that OS.


And this topic is not really related to Java. It may be a good idea to google for "setting PATH environment", along with your Operating System name.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Eva Coppola
Greenhorn

Joined: Jul 28, 2010
Posts: 10
It is in my Java book, and it is something that I need to do in order to proceed with working in Java, so how would this not be a Java-related question? I thought that one of the rules on this ranch is to be nice. Do I really warrant a smackdown on this? My OS is Windows XP.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11494
    
  16

Henry's point was that a simple google search might have gotten you the answer faster. And setting environment variables is more of a "general computing" issue, not Java specific.

In any case, rt-click "my computer". Go to the "Advanced" tab. Click "Environment Variables". You probably want to edit the existing PATH in your System variables. Scroll down to find it, highlight, and click "edit".

Add whatever you need to, making sure to follow the correct format (each new directory should be separated by a semicolon). Don't delete stuff out of here as that may break other programs.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Eva Coppola
Greenhorn

Joined: Jul 28, 2010
Posts: 10
Ok, Fred, I am in that window/directory - in the actual field - but am unsure what to do next - so I appreciate that you specify do not delete. I'd like to ask for further clarification on the exact syntax (the instructions that I found on the Sun site do not give specifics other then where to go and the field to change), but am now hesitant to do so, as I may be informed that my question does not belong here.

This is my first visit to this site, and I thought that as I learn Java and develop my skills, I would continue to participate in these forums...I'm not so sure of that now...

P.S.
I am using the Head First Java Series, the first book I am using being "Head First Java", and that book advises referring to JavaRanch for questions on setting this up.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Eva Coppola wrote:I thought that one of the rules on this ranch is to be nice.

Nobody wasn't nice, and berating a bartender probably isn't the best approach.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 19059
    
  40


I'll admit that I was a bit blunt.... but I was seriously trying to be helpful. I even double checked with google to make sure that my recommendation of "setting Path environment" and "windows xp" would be helpful -- and confirmed that most of the first page links were relevant.

Henry
Eva Coppola
Greenhorn

Joined: Jul 28, 2010
Posts: 10
I wasn't berating anyone. I just need to know how to do this. I didn't know that I'd have to be strung up for asking a question. I did find the instructions on the Sun site, but they are not detailed enough. I have never changed this variable before, I don't know the correct syntax or what to do with it, and I was just asking if someone knows and would be kind enough to tell me. I'm sorry I asked. Obviously my question is too stupid for this site.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40027
    
  28
Welcome to the Ranch

You virtually always need to set a PATH, but avoid setting your CLASSPATH if at all possible.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Eva Coppola wrote:I didn't know that I'd have to be strung up for asking a question.

*That's* your idea of being "strung up"?!

Please, take a step back and reflect: nobody strung you up--good grief. Relax.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11494
    
  16

why don't we all agree that everyone should take a deep breath, relax, and get back to fixing the issue.

Once you highlight "Path" and hit 'edit', you should have a little window that says "Edit system variable", with two text fields.

one should be labeled "variable name", and say "Path"
The other should be labeled "variable value", and have something like (this is my actual path)

c:\program files\java\jre6\bin;C:\oracle\product\9i\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;c:\nmake;C:\Perl\site\bin;C:\Perl\bin;C:\Program Files\Java\jdk1.6.0_20\bin;C:\PROGRA~1\REFLEC~1;C:\oracle\product\10.2.0\client_2\bin;C:\oracle\product\10.2.0\client_1\bin;C:\Program Files\ThinkPad\Utilities;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\Common Files\Lenovo;C:\Program Files\Lenovo\Client Security Solution;c:\Program Files\Altiris\Software Virtualization Agent\;c:\MinGW\bin;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;c:\strawberry\c\bin

you can see it's pretty long. what I'd probably do is click in there somewhere, then hit the 'end' key. that should put your cursor at the end of everything else. then you need to add the path to your install of the Java environment. Nobody here can tell you what that is - it depends on where you told it to put it when you ran the install.

If you dig through mine, you can see my "C:\Program Files\Java\jdk1.6.0_20\bin". This is where the program javac.exe physically exists on the machine. You need to add whatever directory your javac.exe is so that you can compile stuff, and whatever directory your java.exe lives in (they may be the same place) to run java programs.

so, once your at the end of the line, simply type a semi-colon, and add the next directory. If you need a second dir, add another semi-colon and add the second directory after that.

Then click through all the 'saves' and 'apply's until you get out of that.

you will then need to open a new command window, as any already existing ones will NOT pick up the changes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Where do I enter environment parms ?