Whether Java SE is the same as JDK? - Stack Overflow
Best place to install Java se development kit - Stack Overflow
Is Java Development Kit safe?
Also, it was often not kept up to date.
More on reddit.comJava SE development kit?
https://adoptopenjdk.net
More on reddit.comJava Development Kit (JDK) Components
- Javac (compiler): The Java compiler reads the source code files written in Java and converts them into Java bytecode .class files, which can be executed by the Java Virtual Machine on any operating system.
- Java Virtual Machine (JVM): A JVM is a virtual machine that enables the execution of Java bytecode, which is generated by the compiler. The JVM loads, verifies, and executes the code. It provides the runtime environment (see below) and manages the memory, which includes garbage collection.
- Java Runtime Environment (JRE): The JRE provides the essential environment and tools necessary to run Java code. It includes the core Java class libraries.
- Java Archive (jar): Java applications and libraries contain hundreds of different files, such as compiled Java class files, JSON files, configuration data files, images, and so on. In simple terms, the Java Archiver packages multiple files into a single JAR file. It’s like a zip file, but it’s specifically designed for Java applications.
Is There More than One JDK?
JDK distributions are build from the OpenJDK source code, but each vendor builds that source code slightly differently. Choosing the right JDK depends on your development and deployments needs.
Here are some of the most widely used JDK distributions:
- Azul Platform Core based on Azul’s Zulu builds of Open JDK, is a one-to-one replacement for Oracle Java SE at dramatically lower costs. It supports the largest variety of versions, architectures, package types, and configuration options.
- Amazon Corretto is a distribution of OpenJDK provided by Amazon as a convenience for customers that want to deploy their Java applications on Amazon Web Services (AWS) and is supported for free with an AWS subscription.
- Eclipse Temurin is a free distribution of OpenJDK maintained by the Adoptium Project within the Eclipse Foundation. Unlike its AdoptOpenJDK predecessor, Temurin builds are Technology Compatibility Kit (TCK, aka Java Compatibility Kit or JCK) tested to ensure compatibility with Oracle Java SE (in fact, all commercial OpenJDK distributions are TCK/JCK tested) Temurin releases are updated and supported by the Adoptium community.
- Oracle Java SE is Oracle’s commercial build of OpenJDK, offering the latest Java features and updates. Oracle offers commercial support and a subscription model for receiving updates and long-term support for Java SE.
You can learn more about these distributions and a few more in the Oracle Renewal vs OpenJDK Comparison Guide.
OpenJDK Features
- Open source with no restrictions: OpenJDK is open source and freely available, with no-field-of use restrictions, Meaning you can use OpenJDK for any type of application and (as long as you utilize the classpath exceptions) you don’t need to disclose your source code when linking with OpenJDK.
- Regular updates and security fixes: OpenJDK providers are free to release updates for their distributions as soon as Oracle publishes their own quarterly Java updates. Providers should quickly release their updates because the vulnerabilities are published by Oracle with their Java update release notes. Timely release of security updates is essential to mitigate the risk caused by known vulnerabilities (Oracle and Azul are the only distributors that release out-of-cycle updates to address incidents like zero-day vulnerabilities).
- Performance parity: The OpenJDK offers the same level of performance as Oracle Java SE. You can switch between all major OpenJDK distributions without facing any performance degradations.
Videos
Okay, context. I'm trying out some programming languages to perhaps get into (after previously primarily doing stuff with C#). One of these is Java. I had a 2019 version of Eclipse installed from last time I wanted to learn Java. Updated it to 2021, and it tells me I need Java 11 or higher.
So I google "download Java". Oracle offers me to download Java 8 Update 291, released April 2021. I check my instaleld version. Sure enough, I have Java 8 Update 291. If I am up to date, why is Eclipse complaining, I wonder? So I google Java 11. Huh, what's that, there are versions of Java up to 16? One article mentions that Java 8 has been deprecated for years. Odd, I think, didn't Oracle tell me just now that Java 8 was released in 2021? Oh, I see, they are talking about something called "Java SE". So I google what that is. "java vs java se", I google, but all I get are articles about how Java SE is different from something called Java EE. Never heard of it, I don't want it. In the meantime, I have also googled for JDK, since I assume that I need the Java SDK to get the compilers. Maybe the JDK has a different version number than the JRE, I theoretise. But then what is this Java SE? At one point, it says it's the standard edition, but on the next page, it says it's "for reference purposes only". Whatever that means. Can I use it to run and compile Java or not, I ask.
tldr: why is there a Java 16 if Oracle tells me 8 is the latest, which one do I want to run and program with the latest Eclipse?
P.S. necessary context is perhaps that I'm on 64-bit Windows 7 (my Eclipse install on my Linux laptop works fine)
“Java SE” is three things:
- An abbreviation of “Java Standard Edition”
- A trademark owned by Oracle Corp.
- A set of specifications published by Oracle Corp.
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:
- Azul Systems
- SAP
- Amazon
- Microsoft
- IBM
- Red Hat
- Oracle
- Adoptium
- BellSoft
… 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.
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.
I always install JDKs under an x:/tools directory (where x can be any drive letter, by preference not the root drive).
It's quite possible, and works fine. Take care with your JAVA_HOME settings of course, as they need to reflect this location :)
If anything, this works better than installing it under c:/program files/ as some tools have trouble with pathnames that have spaces in them.
Thank you for the response, in that case I shall uninstall it and reinstall again from the beginning. Kian William
I want to download Java Development Kit for building apps out of Unity but after some research, I found a lot of people saying that Java was unsafe, had security vulnerabilites, etc. However, many of these only referred to the plugin or JRE. Is Java Development Kit safe to download?