简体   繁体   中英

Requirement for setting JRE path in windows7, like setting path for JDK

Should I have to add/set the path for JRE as well like I did for JDK 1.7? If yes, then please explain how. If no then why it is not necessary. (I am using windows 7, 64 bit)

Thank you.

The "JDK" is the Java Development Kit. Ie, the JDK is bundle of software that you can use to develop Java based software.

The "JRE" is the Java Runtime Environment. Ie, the JRE is an implementation of the Java Virtual Machine which actually executes Java programs. Without JRE one can only compile the application but cannot run the application.

Since JRE contains the JVM which executes the byte code generated from the javac compiler, you need to add your JRE path to JAVA_HOME variable from the environment variables. Here's the tutorial for doing so: http://java.com/en/download/help/path.xml

Technically, the JDK contains the JRE, so if you have set your PATH properly you shouldn't need a separate entry for the JRE.

Think of it this way - the JRE contains everything you need to run a Java program. The JDK contains everything you need to run AND develop the program.

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