What is the purpose of the Java JDK for Eclipse?

I just installed Eclipse after installing java JDK. The Getting Started Guide (in Eclipse) says that I should refer to my JDK installation in the window> Settings> Java> Installed JREs , but that the JRE will also work.

Select the Java Preferences page> Installed JREs to display the installed Java Runtime runtimes. Verify that the JRE is detected. By default, the JRE used to start the production environment will be used to create and run Java programs. It should appear with a checkmark in the list of installed JREs. We recommend using the Java SDK instead of the JRE. The SDK is designed for development and contains source code for the Java library, making debugging easier.

There was already a JRE (not a JDK) there, so I did nothing and tried to compile Hello World (just to see what happens). To my surprise, it compiled!

I searched a bit and it looks like this works because Eclipse has a built-in Java compiler. I tried to debug using the same eclipse setting, and it was also successful.

So what is the difference between installing JDK and JRE? Why is it important to load the JDK since in my default configuration Eclipse doesn't seem to use it?

+5
source share
4 answers

, JDK, JRE-JConsole (http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html). , , . , , Eclipse JDK!

+2

, , Java ( JDK), . JDK.

, , Java.

+5

JDK , DotMasta. Eclipse "" JDK JDT. javac Eclipse ecj, , . , javac , .. ecj , , :)

+1

JDK , Java.

  • jdk
  • Javac java

Differences and why do you need it?

The JDK includes JVM libraries, standard classes, and several other tools that a developer needs to create a Java program. The JRE includes the JVM because the JRE provides some standard libraries and JVMs that can be used to run Java programs.

You can even look there: http://en.wikipedia.org/wiki/Java_Development_Kit

0
source

All Articles