Java developer kit mac os

Java developer kit mac os

The JDK supports both Intel-based (x64) and Apple Silicon (AArch64) Mac computers.

This topic includes the following sections:

System Requirements for Installing the JDK on macOS

JDK Installation Instruction Notation for macOS

JDK installers now support only one version of any Java feature release. You can’t install multiple versions of the same feature release.

For example, you can’t install jdk- 17 and jdk- 17 .0.1 simultaneously. If you attempt to install jdk- 17 .0.1 after jdk- 17 is installed, the installer uninstalls jdk- 17 and installs jdk- 17 .0.1 .

If you install an older version of a JDK when the newer version of the same feature family already exists, an error is displayed, prompting you to uninstall a newer JDK version if an older version has to be installed.

JDK is installed in /Library/Java/JavaVirtualMachines/jdk- .jdk where is the feature release number. For example, JDK 17 .0.1 is installed in /Library/Java/JavaVirtualMachines/jdk- 17 .jdk .

macOS aarch64 (64-bit ARM) systems:

jdk-17_macos-aarch64_bin.dmg
jdk-17_macos-aarch64_bin.tar.gz

Determining the Default JDK Version on macOS

When starting a Java application through the command line, the system uses the default JDK.

Читайте также:  Php domdocument node name

You can determine which version of the JDK is the default by entering java -version in a Terminal window. If the installed version is 17 Interim 0, Update 0, and Patch 0, then you see a string that includes the text 17 . For example:

$ java -version java version "17" Java(TM) SE Runtime Environment (build 17) Java HotSpot(TM) 64-Bit Server VM (build 23.2-b04, mixed mode)

To run a different version of Java, either specify the full path, or use the java_home tool. For example:

$ /usr/libexec/java_home -v 17 —exec javac -version

Installing the JDK on macOS

  • macOS x64 systems: jdk- _macos-x64_bin.dmg OR jdk- _macos-x64_bin.tar.gz
  • macOS aarch64 (64-bit ARM) systems: jdk- _macos-aarch64_bin.dmg OR jdk- _macos-aarch64_bin.tar.gz

Click Accept License Agreement .

A window appears that displays the message: Installer is trying to install new software. Enter your password to allow this.

After the software is installed, you can delete the .dmg or .tar.gz file if you want to save disk space.

Uninstalling the JDK on macOS

Do not attempt to uninstall Java by removing the Java tools from /usr/bin . This directory is part of the system software and any changes will be reset by Apple the next time that you perform an update of the OS.

  1. Go to /Library/Java/JavaVirtualMachines .
  2. Remove the directory whose name matches the following format by executing the rm command as a root user or by using the sudo tool:

/Library/Java/JavaVirtualMachines/jdk- 17 . interim.update.patch .jdk For example, to uninstall 17 Interim 0 Update 0 Patch 0: $ rm -rf jdk- 17 .jdk

Installation FAQ for macOS

This topic provides answers for the following frequently asked questions about installing JDK on macOS computers.

1. How do I find out which version of Java is the system default?

When you run a Java application from the command line, it uses the default JDK. If you do not develop Java applications, then you do not need to worry about this. See Determining the Default JDK Version on macOS.

2. How do I uninstall Java?

3. After installing Java for macOS 2012-006, can I continue to use Apple’s Java 6 alongside the macOS JDK for Java 17 ?

If you want to continue to develop with Java 6 using command-line, then you can modify the startup script for your favorite command environment. For bash, use this:

$ export JAVA_HOME=`/usr/libexec/java_home -v 17`

Some applications use /usr/bin/java to call Java. After installing Java for macOS 2012-006, /usr/bin/java will find the newest JDK installed, and will use that for all of the Java-related command-line tools in /usr/bin . You may need to modify those applications to find Java 6, or contact the developer for a newer version of the application.

4. What happened to the Java Preferences app in Application Utilities?

The Java Preferences app was part of the Apple Java installation and is not used by Oracle Java. Therefore, macOS releases from Apple that do not include Apple Java will not include Java Preferences.

Источник

Java developer kit mac os

The JDK supports both Intel-based (x64) and Apple Silicon (AArch64) Mac computers.

This topic includes the following sections:

System Requirements for Installing the JDK on macOS

JDK Installation Instruction Notation for macOS

JDK installers now support only one version of any Java feature release. You can’t install multiple versions of the same feature release.

For example, you can’t install jdk- 20 and jdk- 20 .0.1 simultaneously. If you attempt to install jdk- 20 .0.1 after jdk- 20 is installed, the installer uninstalls jdk- 20 and installs jdk- 20 .0.1 .

If you install an older version of a JDK when the newer version of the same feature family already exists, an error is displayed, prompting you to uninstall a newer JDK version if an older version has to be installed.

JDK is installed in /Library/Java/JavaVirtualMachines/jdk- .jdk where is the feature release number. For example, JDK 20 .0.1 is installed in /Library/Java/JavaVirtualMachines/jdk- 20 .jdk .

macOS aarch64 (64-bit ARM) systems:

jdk-20_macos-aarch64_bin.dmg
jdk-20_macos-aarch64_bin.tar.gz

Determining the Default JDK Version on macOS

When starting a Java application through the command line, the system uses the default JDK.

You can determine which version of the JDK is the default by entering java -version in a Terminal window. If the installed version is 20 Interim 0, Update 0, and Patch 0, then you see a string that includes the text 20 . For example:

$ java -version java version "20" Java(TM) SE Runtime Environment (build 20) Java HotSpot(TM) 64-Bit Server VM (build 23.2-b04, mixed mode)

To run a different version of Java, either specify the full path, or use the java_home tool. For example:

$ /usr/libexec/java_home -v 20 —exec javac -version

Installing the JDK on macOS

  • macOS x64 systems: jdk- _macos-x64_bin.dmg OR jdk- _macos-x64_bin.tar.gz
  • macOS aarch64 (64-bit ARM) systems: jdk- _macos-aarch64_bin.dmg OR jdk- _macos-aarch64_bin.tar.gz

Click Accept License Agreement .

A window appears that displays the message: Installer is trying to install new software. Enter your password to allow this.

After the software is installed, you can delete the .dmg or .tar.gz file if you want to save disk space.

Uninstalling the JDK on macOS

Do not attempt to uninstall Java by removing the Java tools from /usr/bin . This directory is part of the system software and any changes will be reset by Apple the next time that you perform an update of the OS.

  1. Go to /Library/Java/JavaVirtualMachines .
  2. Remove the directory whose name matches the following format by executing the rm command as a root user or by using the sudo tool:

/Library/Java/JavaVirtualMachines/jdk- 20 . interim.update.patch .jdk For example, to uninstall 20 Interim 0 Update 0 Patch 0: $ rm -rf jdk- 20 .jdk

Installation FAQ for macOS

This topic provides answers for the following frequently asked questions about installing JDK on macOS computers.

1. How do I find out which version of Java is the system default?

When you run a Java application from the command line, it uses the default JDK. If you do not develop Java applications, then you do not need to worry about this. See Determining the Default JDK Version on macOS.

2. How do I uninstall Java?

3. After installing Java for macOS 2012-006, can I continue to use Apple’s Java 6 alongside the macOS JDK for Java 20 ?

If you want to continue to develop with Java 6 using command-line, then you can modify the startup script for your favorite command environment. For bash, use this:

$ export JAVA_HOME=`/usr/libexec/java_home -v 20 `

Some applications use /usr/bin/java to call Java. After installing Java for macOS 2012-006, /usr/bin/java will find the newest JDK installed, and will use that for all of the Java-related command-line tools in /usr/bin . You may need to modify those applications to find Java 6, or contact the developer for a newer version of the application.

4. What happened to the Java Preferences app in Application Utilities?

The Java Preferences app was part of the Apple Java installation and is not used by Oracle Java. Therefore, macOS releases from Apple that do not include Apple Java will not include Java Preferences.

Источник

Java Development Kit for Mac

Download Java JDK 20.0.1

Java Development Kit for Mac (also known as JDK) is a highly professional cross-platform SDK platform created and regularly supported by Oracle Corporation.With a goal of providing specific implementation of Java SE, Java EE and Java ME platforms developers from all around the world use it. Because of its strong development support, this SDK package represents the most popular and widely used Java SDK platform for creation of both enterprise projects and open-source projects of all sizes. Popularity of Java Development Kits present not only because of the absolutely astonishing set of tools, services and features that this package offers, but also because in late 2006 Oracle released this SDK under the GNU General Public License, making it free for everyone.

Java Development Kit for macOS (often described by Oracle as an “extended” package that expands upon the normal tools that could be find in Java SE Development Kit) hosts wide variety of tools for streamlined developing, debugging, testing, and monitoring of Java applications. The core of the package consists from more than 30 individual tools and service which can effortlessly control every aspect of Java application development, from the concept phase to the final deployment to the end-users.

Development Tools
(In the bin/ subdirectory) Tools and utilities that will help you develop, execute, debug, and document programs written in the JavaTM programming language.

Runtime Environment
(In the jre/ subdirectory) An implementation of the Java Runtime Environment (JRE) for use by the JDK. The JRE includes a Java Virtual Machine (JVM), class libraries, and other files that support the execution of programs written in the Java programming language.

Additional Libraries
(In the lib/ subdirectory) Additional class libraries and support files required by the development tools.

Demo Applets and Applications
(In the demo/ subdirectory) Examples, with source code, of programming for the Javaplatform. These include examples that use Swing and other Java Foundation Classes, and the Java Platform Debugger Architecture.

Sample Code
(In the sample subdirectory) Samples, with source code, of programming for certain Java API’s.

C header Files
(In the include/ subdirectory) Header files that support native-code programming using the Java Native Interface, the JVM Tool Interface, and other functionality of the Javaplatform.

Source Code
(In src.zip) Java programming language source files for all classes that make up the Java core API (that is, sources files for the java.*, javax.* and some org.* packages, but not for com.sun.* packages). This source code is provided for informational purposes only, to help developers learn and use the Java programming language. These files do not include platform-specific implementation code and cannot be used to rebuild the class libraries. To extract these file, use any common zip utility. Or, you may use the Jar utility in the JDK’s bin/ directory: jar xvf src.zip. Download Java Development Kit for Mac now!

Источник

Оцените статью