How do I set the PATH environment variable to point to JRE version 1.5

79,267

Solution 1

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.

Solution 2

In linux from your console:

export PATH=$PATH:your_jre_path_here

In Window:

  • From the desktop, right-click My Computer and click Properties.
  • In the System Properties window, click on the Advanced tab.
  • In the Advanced section, click the Environment Variables button.
  • In the Environment Variables window, highlight the Path variable in the Systems Variable section and click the Edit button.Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon e.g:C:\Program Files;C:\Winnt;C:\Winnt\System32

Solution 3

Set JAVA_HOME:

Right click My Computer and select Properties.

On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.7.0_79

Be sure to download a compatible version of Java JDK for either 64 bit or 32 bit from http://java.sun.com/javase/downloads/index.jsp.

Share:
79,267
JavaNoob
Author by

JavaNoob

Updated on July 06, 2020

Comments

  • JavaNoob
    JavaNoob almost 4 years

    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?