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?
source
share