|Re: Students run Java 8. I need Java 8 to make applications. What Eclipse IDE is best? [message #1806188 is a reply to message #1806180]
||Sun, 05 May 2019 14:45
| David Wegener
Registered: July 2009
Some additional information regarding the difference between a JDK and a JRE. A JDK includes tools to build and run java programs. A JRE only includes the tools to run java programs. Essentially, a JDK contains all of the features included in a JRE. In addition, it provides a compiler, debugger and other monitoring/profiling tools. Put another way, a JRE is a subset of a JDK without the development tools. The JRE is the minimal set of features necessary to run Java programs. If all you have installed on your PC is a JRE you can run java programs but can't build or debug them. The smaller JRE reduces the footprint necessary to run Java programs. Initially, the Sun license (eventually bought by Oracle) for the JDK allowed you to redistribute a JRE with you program. Oracle has apparently stopped providing a separate JRE with Java 11 and later. However, they appear to have included tools in the JDK to allow developers to create their own JRE.|
If you interest is in developing Java applications or teaching Java development, then you will likely want to install the JDK. You would only need to worry about a JRE if you planned to distribute your applications to computers that weren't being used a development machines.
Eclipse requires a Java VM in order to run. At a minimum that means a JRE, but since the JDK includes the Java VM, you can run Eclipse on a JDK. In fact the preferred method for Java development is to run Eclipse on a JDK. One of the extra features provided by a JDK is the full source code for the Java runtime libraries. Having this available when developing Java applications is a great help. When you run Eclipse on a JDK with source installed, it will automatically find the source for source lookups.
The Eclipse Java preferences refer to JREs and this may cause some confusion. The configured Java installations on the JRE preference page can point to both JDKs and JREs.
My recommended setup for Java development would be to install a JDK and launch Eclipse using the JDK. Make sure that the Installed JREs has an entry for the JDK you want to develop against.
Powered by FUDForum
. Page generated in 0.03559 seconds