- JDK - Java Development Kit
- JRE - Java Runtime Environment
- Java SE - Java Standard Edition
SE defines a set of capabilities and functionalities; there are more complex editions (Enterprise Edition – EE) and simpler ones (Micro Edition – ME – for mobile environments).
The JDK includes the compiler and other tools needed to develop Java applications; JRE does not. The JDK also includes a JRE. So, to run a Java application someone else provides, you need a JRE; to develop a Java application, you need a JDK.
Edited:
As Chris Marasti-Georg pointed out in a comment, you can find out lots of information on Sun's Java website, and in particular from the Java SE section (2nd option, Java SE Development Kit (JDK) 6 Update 10).
Edited 2011-04-06:
The world turns, and Java is now managed by Oracle, which bought Sun. Later this year, the sun.com
domain is supposed to go dark. The new page (based on a redirect) is this Java page at the Oracle Tech Network. (See also java.com.)
Edited 2013-01-11: And the world keeps on turning (2012-12-21 notwithstanding), and lo and behold, JRE 6 is about to reach its end of support. Oracle says no more public updates to Java 6 after February 2013.
Within a given version of Java, this answer remains valid. JDK is the Java Development Kit, JRE is the Java Runtime Environment, Java SE is the standard edition, and so on. But the version 6 (1.6) is becoming antiquated.
Edited 2015-04-29: And with another couple of revolutions around the sun, the time has come for the end of support for Java SE 7, too. In April 2015, Oracle affirmed that it was no longer providing public updates to Java SE 7. The tentative end of public updates for Java SE 8 is March 2017, but that end date is subject to change (later, not earlier).
The versioning is simply a mess:
- Java 1.0 and 1.1 were normal
- Then came Java 1.2, but you were supposed to call it "Java 2, JDK 1.2"
- This continued until 1.4 (There were also minor releases like 1.4.2)
- The next version was then supposedly "Java 5.0", but there was still "1.5" all over the place in the file names and URLs.
- Starting with Java 6, they've dropped the minor version and mostly (but not completely, see output of
java -version
) eliminated the traces of the old versioning scheme, but people have gotten used to it and continue to use it colloquially.
- Starting with Java 9 or 10, the 1.X notation also disappeared from the output of
java -version
(which caused some code that depended on parsing it to break), and people have pretty much stopped using it. We now have Java 15, Java 16, Java 17, etc.
Note also that when this question was asked, Sun JDK and OpenJDK were separate codebases (whith a large overlap), and Sun JDK was the official reference implementation.
In the more than 10 years since then, Java was sold to Oracle, OpenJDK became the official Java reference implementation, and Oracle stopped maintaining the Oracle JDK as a separate codebase. Instead, they just provide OpenJDK builds and provide commercial long term support for them with bugfixes and security patches. But you can also get builds for free from AdoptOpenJDK (which recently rebranded as "Adoptium"), they just aren't supported as long.
Best Answer
You are correct in that you will need a JRE package to run any Java application.
Since you say you're running on an embedded platform I assume that the Java application you want to run has no GUI. In that case, you will be fine with
openjdk-6-jre-headless
. This is explained on the openjdk-6-jre-headless package page here "Minimal Java runtime - needed for executing non GUI Java programs".As you can see from the debian package details page,
openjdk-6-jre-headless
depends onopenjdk-6-jre-lib
(among other packages), so that will get installed either way.If however the Java application you want to run has a GUI, you will need
openjdk-6-jre
instead ofopenjdk-6-jre-headless