2

Me has been fighting with internet for a while for that single answer. Everything else now seems standing on it's place after this trip.

When I ask "What's Java SE" they say "Java SE is set of core Java classes ...... platform ... develop desktop apps .... contains core libraries and APIs ..... Java EE is a spec set to be implemented ...... Java EE is built on top of the Java EE". Sometimes they mention javac and JVM, sometimes they don't. What they do never (almost) is mention JDK.

When I ask "What's JDK" they say "JDK is set of stuff that lets us build apps on Java including javac, JVM etc." and never (almost) mention Java SE.

When I ask "Difference between Java SE and JDK" they give me that page and nothing more to think about. What does this mean: "Java SE product name for JDK"? Can't clearly understang right now.

Lack of terminology presicion and experiece for me? Possibly yes. I think would be able to answer this question myself if I were more experienced.

The questions:

  1. "Whether (Java SE) == (JDK) or not?" (pls with wide explanation and terminology clarifications when needed).
  2. Is Java SE a spec set like Java EE or not?
  3. Can I find precise definitions somewhere to look at?

Sorry for a big writing. It proves that I would really love to put an end to this.

Gregor
  • 73
  • 4
  • 1
    "Java SE" is the "Standard Edition" as opposed to "Java EE" a.k.a. "Enterprise Edition", for both you need either a pure execution environment "JRE", "Java Runtime Environment" or to develop a "JDK" "Java Development Kit" which includes a compiler. Java EE is a little special (and kind of dead) since it's also a lot of specification on top of SE – zapl Sep 29 '22 at 22:48
  • That page you linked to answers the question - the JDK is part of the SE product, but there are other parts. – Dawood ibn Kareem Sep 29 '22 at 22:49
  • You won't find a single set of official definitions that "work" in the sense that they explain what people *mean* when they use these terms. Why? Because a lot of people *misuse* the terms. – Stephen C Sep 29 '22 at 23:29
  • @Gregor - Here's an excellent diagram: https://www.oracle.com/java/technologies/platform-glance.html. "JDK" and "Java SDK" mean exactly the same thing. "Java SE" *includes* the JDK. – paulsm4 Sep 30 '22 at 01:00
  • Thanks, guys. My question is now marked as duplicated, which I think is not completely right. At least answers given here are definitely more helpful (for me) than those given in related question. They are also modern compared to ten-years-ago posted ones. I think maybe this mark is better to be removed. – Gregor Sep 30 '22 at 01:21

4 Answers4

7

“Java SE” is three things:

Anybody in the world is free to write software that implements the Java SE specifications. In the past, several companies have done so.

However, anybody in the world is not free to use the trademark of Java. To use that trademark, a person or company is required to come to terms with Oracle in a licensing deal. Presumably that deal would require payment.

Long story short, and over-simplified for brevity… Some of the companies that previously wrote their own implementations of Java SE decided to join forces, combine their codebases, and publish the whole thing as open-source. These companies included Oracle, IBM, and Apple. Thus was born the OpenJDK project (Wikipedia). Since then, other companies and individuals have joined the project.

The OpenJDK name is a trademark owned by Oracle. However, Oracle has published permission allowing others to use the term with no payment required.

The OpenJDK project published source code to an implementation of the Java SE specifications. The project does not publish built binaries or installers.

Several vendors do publish built binaries or installers for implementations of the Java SE specs. Nearly all of these implementations rely largely, if not entirely, in the OpenJDK source code.

These binaries/installers vendors include, in no particular order:

… and more.

Most of those built binary or installers products use OpenJDK in their name or in their descriptions, as allowed by Oracle. A few of those products may use the term Java or Java SE with explicit permission from Oracle.

There are other editions of Java technology:

  • Java Card (for smart cards, badges, etc.)
  • Java ME, or Micro Edition (for constrained devices)
  • Java EE, or Enterprise Edition (a wide collection of specifications that run on top of an implementation of the Java SE specs, aimed at developers making software for enterprise oriented users)

The first two, Java Card & Java ME are owned by Oracle. The third, Java EE, was donated by Oracle Corp to the Eclipse Foundation were it is now known as Jakarta EE. Jakarta EE is a collection of specifications, with various vendors publishing implementations.

The term “JDK” refers to Java Development Kit. This kit includes an implementation of the Java SE specs, plus tools to write Java apps. These tools include a compiler.

The term “JRE” refers to Java Runtime Environment. This is a JDK minus some of the software development tools.

The term “JVM” refers to Java Virtual Machine. A JVM is a piece of software that enables a Java-based app to execute at runtime on a particular kind of host computer and operating system. Java apps are platform-agnostic, in other words, are not “native”. So a Java app needs a particular JVM to know how to run on a Mac, on a PC, or on a mainframe.

Every JDK and every JRE contains a JVM.

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
  • "Presumably that deal would require payment." - It used to be that you could only use the term Java if your implementation was blessed by Sun as passing the appropriate JCK tests. – Stephen C Sep 29 '22 at 23:32
  • @StephenC The terms for each licensee were private, as far as I know. Yes, Oracle publicly claimed that each licensed product was rigorously tested. But, as far as I know, the details of any product’s testing were kept confidential. And there seemed to always be a payment of some kind for the trademark license. This topic of testing seems unrelated to this discussion. I’m not sure why you raised it. – Basil Bourque Sep 29 '22 at 23:36
  • Well ... I was peripherally involved with the GNU Classpath project ... back in the day ... and one of the roadblocks was the *availability* of the JCK tests. You could only use the "Java" trademark if you passed the tests, but you could only get the tests if you paid for a license. But you weren't strictly paying for a license to use the Trademark. The JCK was Sun's play to prevent people using the Microsoft "embrace and extend" play to fork Java. It was also to (try to) head off accusations of anti-competitive behavior by Sun. (Though I doubt Oracle cares anymore.) – Stephen C Sep 30 '22 at 00:58
  • The rule about JCK compliance as a prerequisite for using the Java trademark was (if I recall correctly) public. – Stephen C Sep 30 '22 at 01:03
  • @StephenC Are you saying that implementors back then paid only for the test kit, and then got to use the *Java* trademark at no further charge if they could pass the tests? If so, I didn't know that. – Basil Bourque Sep 30 '22 at 01:12
  • I believe that was so. But I'm not sure that they paid >only< for the test kit. It may be that you needed a Java source license to get access to the JCK tests. Anyway, Classpath's goal was to produce a clean-room implementation of the Java SE libraries, so a source license was a show stopper. (It was all mooted when Sun release the Java SE source code under GPL + Classpath exception licensing. Yes ... that's why it is called the Classpath exception!) – Stephen C Sep 30 '22 at 03:06
1

1 . Yes, you can think of Java SE same as JDK. Java SE is the 'base' platform that defines the Java language specification (JLS), the Java Virtual Machine Specification (JVMS), Standard library APIs, byte-code format, compilation tools, and the class loader.

Now, this is all concepts and specifications and community proposals (via JCP) until implemented into a set of software tools. The set of software and tools that implements all of the above is called JDK.

JDK is essentially a Software Development Kit (SDK). They simply decided to name it JDK.

2 . Yes, Java SE is basically a set of specs. An implementation must follow the spec and get it reviewed & approved by Oracle before they can call their implementation Java.

In the case of Java EE the specifications deal with libraries & APIs most of the time. In case of Java SE the specs also care about language and VM details. You take Java SE (the standard JDK) + add some libraries and now you have Java EE. Oracle refers to this as Java EE SDK though.

3 . Unless your life depends on it. Just understand the relationship between Java SE, Java EE, JDK, SDK, and you are good. Just connect the dots and be done with it.

Abdullah Leghari
  • 2,332
  • 3
  • 24
  • 40
0

I think your confusion stems from what Java is. Originally, most languages were like C, where you write code, and it gets compiled to a specific computer architecture/ISA (x86, ARM, whatever).

Java "changed the game" when it came on the market, because it was:

  1. Free (many langs at the time were proprietary)

  2. Enforced object oriented programming style (which all the cool kids were doing at the time)

  3. It added the JVM. The JVM is installed on top of the ISA, it was a piece of middleware that meant that compiled Java code could "run anywhere" (in practice, this isn't strictly true, but it's aside the point)

Anyways, if you just need to run Java programs, you can just install the JVM/JRE (of which the JVM is a component). If you actually need to develop Java programs, you need one of these "editions," which supports more or less features, depending on what you are doing with it. If you're a hobbyist programmer, SE is fine. SE, EE, and ME all include the JRE, JVM and JDK.

casr
  • 77
  • 6
0

For a start here is the language specification (what's the meaning of for) itself and the JVM (Java Virtual Machine) specification. A JVM knows how to execute the code in the end. (see https://docs.oracle.com/javase/specs/)

"Java SE" is the "Standard Edition" as opposed to "Java EE" which is the "Enterprise Edition"

Enterprises create webservers so Java EE specifies many things needed for running Java based Webservers like how to respond to web requests. There also additional libraries and webservers that adhere to that Java EE spec but they are still written in Java, i.e. what you do with plain Java (SE). See https://www.oracle.com/java/technologies/javaee-8-sdk-downloads.html

To run any kind of Java program you you'll need a JRE (Java Runtime Environment) which is in a way part of Java SE because it bundles all the core functionality of Java. The core libraries (like the implementation of the String class) as well as a JVM implementation (Oracle, OpenJDK, ...). Even an EE webserver would still require a JRE to run.

If you want to develop a Java program, you will also need a JDK (Java Development Kit) which is essentially a JRE plus extra tools, the compiler for example. The compiler takes .java files and create .class files which is what the JVM needs.

It's also in a way part JavaSE but I wouldn't says JavaSE = JDK.

Java SE and just "Java" is probably the same, the other terms all go into different aspects of Java.

zapl
  • 63,179
  • 10
  • 123
  • 154