简体   繁体   中英

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

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?

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.

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 eg:C:\\Program Files;C:\\Winnt;C:\\Winnt\\System32

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM