208

I see many different Java terms floating around. I need to install the JDK 1.6. It was my understanding that Java 6 == Java 1.6. However, when I install Java SE 6, I get a JVM that reports as version 11.0! Who can solve the madness?

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
Joe Schneider
  • 9,179
  • 7
  • 42
  • 59
  • 19
    There is a a nice [**Java Conceptual Diagram**](http://docs.oracle.com/javase/7/docs/index.html) (with clickable links) that can help too. – informatik01 Dec 19 '13 at 20:21

6 Answers6

203
  • 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. So, to run a Java application someone else provides, you need JRE; to develop a Java application, you need JDK.

Edited: As Chris Marasti-Georg pointed out in a comment, you can find out lots of information at Sun's Java web site, 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).

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
  • 2
    So, if I need JDK 1.6, what do I install? Installing Java SE 6 gives me a JVM that reports as version 11.0! – Joe Schneider Oct 30 '08 at 15:15
  • 1
    You need to go to sun and download JDK 1.6 or 6, whatever they have it listed as. – Chris Marasti-Georg Oct 30 '08 at 15:17
  • I believe that what comes with Java SE 6 should be the correct JDK, despite internal version number differences. – Jonathan Leffler Oct 30 '08 at 15:17
  • http://java.sun.com/javase/downloads/index.jsp 2nd option, Java SE Development Kit (JDK) 6 Update 10 – Chris Marasti-Georg Oct 30 '08 at 15:18
  • You don't need a JDK to develop a java app. All you need is a Java compiler, if you are using Eclipse you don't need to download any JDK (Eclipse has its own compiler). – Pacerier Apr 26 '12 at 20:19
  • 1
    @Pacerier: was that true in October 2008? Also, the principle component of the JDK is the Java compiler, isn't it? – Jonathan Leffler Apr 26 '12 at 20:40
  • @JonathanLeffler Yes, but the JDK comes with many other things besides the Java compiler. We don't need the JDK to develop a java app, all we need is a Java compiler. – Pacerier Apr 26 '12 at 20:57
  • And way years later, Java 6 is still alive and kicking, at least in the banking sector. – magallanes Apr 18 '15 at 10:43
  • 2
    *"SE defines a set of capabilities and functionalities"*. This is vague. Could you elaborate more on this? I understand that JDK contains the compiler and *probably* the standard libraries **too**. Am I right? If yes, what does SE contain? What *kind* of capabilities and functionalities? I mean if I want to use lambda, then I've to install appropriate JDK to compile my code, right? and SE has no role there? – Nawaz Jan 06 '18 at 05:19
  • ... and who contains the JVM? SE, JDK, JRE? :-/ I guess it is JRE which contains the JVM. I think you need to update your answer with these informations. – Nawaz Jan 06 '18 at 05:29
  • 1
    @Nawaz: There's a serious limit to how much of that sort of information could be included in this answer without it becoming too broad. Such questions are answered on the Oracle and Java web sites. For example, you should review [Where can I get technical information about Java](https://java.com/en/download/faq/techinfo.xml). It has sections comparing and contrasting JRE and JDK, and JRE and JSE. I believe the JVM comes with the JDK as well as with JRE; if you're a developer, you get JDK, but as a user, JRE is sufficient. Lambda support depends on the version of Java (9 vs 8 vs 7 vs 6...). – Jonathan Leffler Jan 06 '18 at 07:11
  • @JonathanLeffler Are you going to add another edit section, now that **Oracle's JDK licensing has changed**? The word is keep turning :) – Lefteris Xris Jun 06 '19 at 08:27
  • @LefterisXris: I'm not really planning to do more updates to this answer. I don't work with Java much, and am not keeping sufficiently up-to-date on the current versions. I think Java 12 is current (Wikipedia on [Java Version History](https://en.wikipedia.org/wiki/Java_version_history)) — but I think the 'real world' is mostly using much older versions (8, even 7 and 6 still; sometimes something a bit newer), maybe in part because of the licensing changes. – Jonathan Leffler Mar 03 '20 at 17:20
123

This might help someone:

I am installing the latest Java on my system for development, and currently it's Java SE 7. Now, let's dive into this "madness", as you put it...

All of these are the same (when developers are talking about Java for development):

  • Java SE 7
  • Java SE v1.7.0
  • Java SE Development Kit 7

Starting with Java v1.5:

  • v5 = v1.5.
  • v6 = v1.6.
  • v7 = v1.7.

And we can assume this will remain for future versions.

Next, for developers, download JDK, not JRE.

JDK will contain JRE. If you need JDK and JRE, get JDK. Both will be installed from the single JDK install, as you will see below.

As someone above mentioned:

  • JDK = Java Development Kit (developers need this, this is you if you code in Java)
  • JRE = Java Runtime Environment (users need this, this is every computer user today)
  • Java SE = Java Standard Edition

Here's the step by step links I followed (one step leads to the next, this is all for a single download) to download Java for development (JDK):

  1. Visit "Java SE Downloads": http://www.oracle.com/technetwork/java/javase/downloads/index.html
  2. Click "JDK Download" and visit "Java SE Development Kit 7 Downloads": http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html (note that following the link from step #1 will take you to a different link as JDK 1.7 updates, later versions, are now out)
  3. Accept agreement :)
  4. Click "Java SE Development Kit 7 (Windows x64)": http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-windows-x64.exe (for my 64-bit Windows 7 system)
  5. You are now downloading (hopefully the latest) JDK for your system! :)

Keep in mind the above links are for reference purposes only, to show you the step by step method of what it takes to download the JDK.

And install with default settings to:

  • “C:\Program Files\Java\jdk1.7.0\” (JDK)
  • “C:\Program Files\Java\jre7\” (JRE) <--- why did it ask a new install folder? it's JRE!

Remember from above that JDK contains JRE, which makes sense if you know what they both are. Again, see above.

After your install, double check “C:\Program Files\Java” to see both these folders. Now you know what they are and why they are there.

starball
  • 20,030
  • 7
  • 43
  • 238
Xonatron
  • 15,622
  • 30
  • 70
  • 84
  • 10
    this answer needs to be bumped up :) – fchen Jan 22 '13 at 15:12
  • I recently had to install a jre to run one of the other installer and then had to install a 32 bit version to get one of the other installers to work. The version I am using at the end of that is glassfish 4 which still doesnt seem to be providing javax.persistence. It then turned out I needed maven, which you unzip and then set some environment variables. What a mess! – JonnyRaa Nov 22 '13 at 12:02
  • It seems to me that Java SE and Java SDK are one and the same package. – galmok Oct 28 '14 at 10:06
61

When you type "java -version", you see three version numbers - the java version (on mine, that's "1.6.0_07"), the Java SE Runtime Environment version ("build 1.6.0_07-b06"), and the HotSpot version (on mine, that's "build 10.0-b23, mixed mode"). I suspect the "11.0" you are seeing is the HotSpot version.

Update: HotSpot is (or used to be, now they seem to use it to mean the whole VM) the just-in-time compiler that is built in to the Java Virtual Machine. God only knows why Sun gives it a separate version number.

Paul Tomblin
  • 179,021
  • 58
  • 319
  • 408
28

A Brief and Maybe Incorrect History of Java Versions

  • Java is a platform. It consists of two products - the software development kit, and the runtime environment.

  • When Java was first released, it was apparently just called Java. If you were a developer, you also knew the version, which was a normal "1.0" and later a "1.1". The two products that were part of the platform were also given names:

    • JDK - "Java Development Kit"
    • JRE - "Java Runtime Environment"
  • Apparently the changes in version 1.2 so significant that they started calling the platform as Java 2.

    • The default "distribution" of the platform was given the moniker "standard" to contrast it with its siblings. So you had three platforms:

      • "Java 2 Standard Edition (J2SE)"
      • "Java 2 Enterprise Edition (J2EE)"
      • "Java 2 Mobile Edition (J2ME)"
    • The JDK was officially renamed to "Java 2 Software Development Kit".

  • When version 1.5 came out, the suits decided that they needed to "rebrand" the product. So the Java platform got two versions - the product version "5" and the developer version "1.5" (Yes, the rule is explicitly mentioned -- "drop the '1.'). However, the "2" was retained in the name. So now the platform is officially called "Java 2 Platform Standard Edition 5.0 (J2SE 5.0)".

    • The suits also realized that the development community was not picking up their renaming of the JDK. But instead of reverting their change, they just decide to drop the "2" from the name of the individual products, which now get be "J2SE Development Kit 5.0 (JDK 5.0)" and "J2SE Runtime Environment 5.0 (JRE 5.0)".
  • When version 1.6 come out, someone realized that having two numbers in the name was weird. So they decide to completely drop the 2 (and the ".0" suffix), and we end up with the "Java Platform, Standard Edition 6 (Java SE 6)" containing the "Java SE Development Kit 6 (JDK 6)" and the "Java SE Runtime Environment 6 (JRE 6)".

  • Version 1.7 did not do anything stupid. If I had to guess, the next big change would be dropping the "SE", so that the cycle completes and the JDK again gets to be called the "Java Development Kit".

Notes

  • For simplicity, a bunch of trademark signs were omitted. So assume Java™, JDK™ and JRE™.

  • SO seems to have trouble rendering nested lists.

References

Epilogue

Just drop the "1." from versions printed by javac -version and java -version and you're good to go.

Manav
  • 10,094
  • 6
  • 44
  • 51
6

With the release of Java 5, the product version was made distinct from the developer version as described here

Version 1.5.0 or 5.0?

Both version numbers "1.5.0" and "5.0" are used to identify this release of the Java 2 Platform Standard Edition. Version "5.0" is the product version, while "1.5.0" is the developer version. The number "5.0" is used to better reflect the level of maturity, stability, scalability and security of the J2SE.

"Version 5.0" Used in Platform and Product Names

Version 5.0 is used in the platform and product names as given in this table:

Full Name Abbreviation
Platform name Java™ 2 Platform Standard Edition 5.0 J2SE™ 5.0
Products delivered under the platform J2SE™ Development Kit 5.0 JDK™ 5.0
J2SE™ Runtime Environment 5.0 JRE 5.0

"Version 1.5.0" Used by Developers

J2SE also keeps the version number 1.5.0 (or 1.5) in some places that are visible only to developers, or where the version number is parsed by programs. As mentioned, 1.5.0 refers to exactly the same platform and products numbered 5.0. Version numbers 1.5.0 and 1.5 are used at:

  • java -version (among other info, returns java version "1.5.0")
  • java -fullversion (returns java full version "1.5.0-b64")
  • javac -source 1.5 (javac -source 5 also works)
  • java.version system property
  • java.vm.version system property
  • @since 1.5 tag values
  • jdk1.5.0 installation directory
  • jre1.5.0 installation directory
  • http://java.sun.com/j2se/1.5.0 website (http://java.sun.com/j2se/5.0 also works)
toolkit
  • 49,809
  • 17
  • 109
  • 135
5

Java SE Runtime is for end user, so you need Java JRE version, the first version of Java was the 1, then 1.1 - 1.2 - 1.3 - 1.4 - 1.5 - 1.6 etc and usually each version is named by version so JRE 6 means Java jre 1.6, anyway there is the update version, for example 1.6 update 45, which is named java jre 6u45.

From what I know, they preferred to use the number 6 instead using 1.6 to better reflect the level of maturity, stability, scalability, security and more

mario
  • 51
  • 1
  • 1