Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi there I have a program that requires me to set the PATH environment variable to point to JRE version 1.5 as I need to access the program via a command prompt. So any ideas on how to do that?

share|improve this question
Please include as much details about your environment as you can when posting questions. This process is completely different for different operating systems. It's even different for different editions of the same operating system. – squillman Aug 19 '10 at 2:40

Test the change by running "PATH=${PATH}:(your additional directory here)" and, if everything works as intended, edit the "PATH=" line in ~/.bash_login to automatically use the new configuraiton.

This PATH HowTo should cover further questions, if needed.

share|improve this answer
This should work, but the ~/.bash_profile is more typical location for environment variable settings. Also, if you have a .bash_profile, .bash_login does not get executed – Alex Aug 19 '10 at 2:43

"Go to the control panel > System > Advanced and edit your environment variables there. Append "; C:\path\to\the\jre\bin" to the PATH variable. Open a new terminal and profit."

Answer provided by Borealid

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.