Java Technology  «Prev  Next»
Lesson 3Acquiring the Java 21 SDK
ObjectiveDownload/install Java 2 Software Development Kit (SDK).

Acquiring Java SDK 21

What are the steps for acquiring the Java SDK 21?
While Java SDK 21 (version 17) is still available for download, it reached its end-of-public-updates phase in September 2023. This means it no longer receives official security updates or bug fixes from Oracle.
For security and stability reasons, it's highly recommended to use a more recent, supported version of the Java SDK. The current release as of today, February 22, 2024, is Java SDK 22 (version 19).
Here are the steps for acquiring it:
  1. Download the Java SDK:
    • Go to the official Java SE Downloads page: [https://www.oracle.com/java/technologies/downloads/] Java Downloads
    • Under "Java SE Development Kit Downloads", find and select the version you want to download (e.g., Java SE 22).
    • Choose the appropriate download package based on your operating system (Windows, macOS, Linux).
    • Click the "Download" button for the chosen package.
  2. Install the Java SDK:
    • Double-click the downloaded installer file.
    • Follow the on-screen instructions for the installation process.
    • During installation, you can choose to customize the installation directory and adjust environment variables (optional).
  3. Verify the installation:
    • Open a command prompt or terminal window.
    • Type `java -version` and press Enter.
    • The output should display information about the installed Java version, confirming successful installation.

Additional Notes:
  • If you previously had a different Java version installed, make sure to update your system's environment variables to point to the new installation directory of Java SDK 22.
  • Consider setting the JAVA_HOME environment variable to avoid potential conflicts with other Java installations.

Remember, using unsupported Java versions carries security risks. By keeping your Java installation up-to-date, you ensure both functionality and protection from potential vulnerabilities.

Java Compliance

Java compliance refers to how well a Java program conforms to the Java standards set forth by Sun (now Oracle). Since the JDK[1] is the standard Java development toolkit, programs developed using the JDK are guaranteed to be Java compliant. If you should decide to use a third-party Java development tool, make sure that it is certified as being Java compliant. This is typically displayed prominently on the packaging. Most third-party tools have undergone stringent compliance tests and are safe to use. One of the reasons compliance is such a big issue is because Java is constantly evolving, which requires development tools to also evolve and support Java's latest features and enhancements.
Another important compliance issue relates to the computing platform you are using; the JDK is currently only available for Windows and UNIX. However, third-party Java development tools are available for other platforms such as Apple Macintosh.

Which Java package do I need?

Software Developers: JDK (Java SE Development Kit). For Java Developers, the JDK includes a complete JRE plus tools for developing, debugging, and monitoring Java applications.
Administrators running applications on a server: Server JRE (Server Java Runtime Environment) For deploying Java applications on servers. Includes tools for JVM monitoring and tools commonly required for server applications, but does not include browser integration (the Java plug-in), auto-update, nor an installer.
JRE: (Java Runtime Environment). The JRE covers most end-users needs and contains everything required to run Java applications on your system.

The Java 2 Software Development Kit, or SDK, is the standard suite of Java development tools, and serves as a good starting point for new Java developers. The JDK is the official standard development environment for Java.
The Java 2 SDK is the standard tool kit for the Java 2 platform. You may also hear the Java 2 SDK referred to as the Java 2 development platform.
The Java 2 SDK is guaranteed to be compliant with the latest version of Java. This is important because Java is constantly evolving and it takes time for third-party development tools to support newer versions of Java.
Prior to Java 2, the SDK was referred to as the Java Development Kit (JDK). JDK and SDK are the same thing, so do not get confused by the name change.

If you are running a version of Windows, you can run the Java 2 SDK tools from the MS-DOS Prompt, which is accessible from the Programs menu after clicking the Start button.
If you are running Unix, then you run the Java 2 SDK tools from a suitable command shell.

Installing Java2 - Exercise

Click the exercise link below to download and install the Java 2 SDK.
Installing Java - Exercise

[1] : Editor's note: JDK is the acronym for the Java Development Kit. Prior to Java 2, the Java SDK was called the JDK.

SEMrush Software