Java 2 Sdk Mac

This page describes how to install and uninstall JDK 8 for OS X computers.

Java 2 Sdk Mac
  • Sdk list java will list the java versions available on your system as well as available online for installation including their identifier that you can use in the sdk use, sdk default and sdk install commands. To install Amazon Corretto 11.0.8 and ask if it should be the new default do this: sdk install java 11.0.8-amzn.
  • Mitr-Api is a java library to access Microsoft Agents from Sun Java SDK on Windows 2000/XP using Java 1.4.2 or higher. File Name: Mitr-API-0.1.zip Author: cdacbangalore.in.
  • Where can I download the Java 2 SE 1.4.202 SDK for the MacOS? Also, what is the best Winzip-like utility for the Mac and what is its URL?

This page has these topics:

See 'JDK 8 and JRE 8 Installation Start Here' for general information about installing JDK 8 and JRE 8.

Important Notice! Java SE 6 represents the latest release of the Java Platform, Standard Edition. Customers are encouraged to migrate today. » Read More Release 1.4 of the Java 2 Platform, Standard Edition (J2SE) represents an advance from J2SE 1.3.

See 'OS X Platform Install FAQ' for general information about installing JDK 8 on OS X.

System Requirements

Observe the following requirements:

  • Any Intel-based computer running OS X 10.8 (Mountain Lion) or later.

  • Administrator privileges.

Note that installing the JDK on OS X is performed on a system wide basis, for all users, and administrator privileges are required. You cannot install Java for a single user.

Installing the JDK also installs the JRE. The one exception is that the system will not replace the current JRE with a lower version. To install a lower version of the JRE, first uninstall the current version as described in 'Uninstalling the JRE'.

JDK Installation Instructions

When you install the Java Development Kit (JDK), the associated Java Runtime Environment (JRE) is installed at the same time. The JavaFX SDK and Runtime are also installed and integrated into the standard JDK directory structure.

Depending on your processor, the downloaded file has one of the following names:

  • jdk-8uversion-macosx-amd64.dmg

  • jdk-8uversion-macosx-x64.dmg

Where version is 6 or later.

  1. Download the file.

    Before the file can be downloaded, you must accept the license agreement.

  2. From either the Downloads window of the browser, or from the file browser, double click the .dmg file to launch it.

    A Finder window appears containing an icon of an open box and the name of the .pkg file.

  3. Double click the package icon to launch the Install app.

    The Install app displays the Introduction window.


    Note:

    In some cases, a Destination Select window appears. This is a bug, as there is only one option available. If you see this window, select Install for all users of this computer to enable the Continue button.

  4. Click Continue.

    The Installation Type window appears.

  5. Click Install.

    A window appears that says 'Installer is trying to install new software. Type your password to allow this.'

  6. Enter the Administrator login and password and click Install Software.

    The software is installed and a confirmation window appears.

  7. Refer to http://www.oracle.com/technetwork/java/javase/downloads/jdk-for-mac-readme-1564562.html for more information about the installation.

  8. After the software is installed, delete the .dmg file if you want to save disk space.

Determining the Default Version of the JDK

If you have not yet installed Apple's Java OS X 2012-006 update, then you are still using a version of Apple Java 6 that includes the plug-in and the Java Preferences app. See 'Note for Users of OS X that Include Apple Java 6 Plug-in'.

There can be multiple JDKs installed on a system, as many as you wish.

When launching a Java application through the command line, the system uses the default JDK. It is possible for the version of the JRE to be different than the version of the JDK.

You can determine which version of the JDK is the default by typing java -version in a Terminal window. If the installed version is 8u6, you will see a string that includes the text 1.8.0_06. For example:

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

For more information, see the java_home(1) man page.

Uninstalling the JDK

To uninstall the JDK, you must have Administrator privileges and execute the remove command either as root or by using the sudo(8) tool.

For example, to uninstall 8u6:

Java 2 Sdk Mac Download

Java 2 Sdk Mac

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 you perform an update of the OS.

The Leap Motion Java SDK uses a standard Jar file for Leap Motion API class definitions and a set of native libraries that allow your Leap-enabled Java programs to exchange data with the Leap. Setting up a Java project typically involves adding the LeapJava.jar file to your application’s classpath and setting the JVM library path parameter so that your JVM can find the native libraries.

Leap Motion Java libraries¶

The Leap Motion Jar file is cross-platform, but the native libraries must match the platform and architecture of the JVM used to run the program.

Java 2 sdk mac os

To use the Leap Motion SDK in a Java program, you must add the LeapJava.jar file to the classpath and set the java.library.path to the location of the Leap Motion native libraries.

Use the following Java and native libraries with the Leap Motion Java SDK:

  • 32-bit Windows:
    • LeapSDK/lib/LeapJava.jar — Leap Motion Java API class definitions
    • LeapSDK/lib/x86/LeapJava.dll — 32-bit Leap Motion Java library for Windows
    • LeapSDK/lib/x86/Leap.dll — 32-bit Leap Motion library for Windows
  • 64-bit Windows:
    • LeapSDK/lib/LeapJava.jar — Leap Motion Java API class definitions
    • LeapSDK/lib/x64/LeapJava.dll — 64-bit Leap Motion Java library for Windows
    • LeapSDK/lib/x64/Leap.dll — 64-bit Leap Motion library for Windows
  • 32- or 64-bit Mac OS:
    • LeapSDK/lib/LeapJava.jar — Leap Motion Java API class definitions
    • LeapSDK/lib/libLeapJava.dylib — Leap Motion Java library for Mac
    • LeapSDK/lib/libLeap.dylib — Leap Motion library for Mac

Compile from the command line¶

Use the Java compiler, javac to compile, setting the classpath option to specify the LeapJar file. For example, to compile the Sample.java program included in the Leap Motion SDK, you could use the following command:

(where <LeapSDK> is the location of your Leap Motion SDK folder.)

Run from the command line¶

To launch a Leap-enabled program, Java needs to find the Leap Motion native libraries at runtime. LeapJava.jar must also be on the classpath. You can set Java’s java.library.path parameter to identify the native library. The command line syntax is slightly different between Mac and Windows. More importantly, on Windows, you have to specify either the 32-bit or the 64-bit libraries to match the architecture of the JVM you are using.

On Mac, you could run the Sample program using the following command:

On Windows, you could run the Sample program using a 64-bit JVM with the following command:

Eclipse¶

In the Eclipse IDE, you add the LeapJava.jar file to a project as an external Jar and then set the path to the appropriate native Leap Motion libraries as a property of the Jar file.

  1. Select New > Java Project from the Eclipse File menu.
  2. Assign a name to the project on the Create Java Project page and set other properties as desired. (The Leap Motion SDK supports Java 6 and 7.)
  3. Click Next to advance to the Java Settings page.
  4. Select the Libraries tab.
  5. Click the Add External Jars... button.
  6. Navigate to the LeapJava.jar file.
  7. Click Open to add LeapJava.jar to the project.
  8. Next, click the small triangle in front of the LeapJava.jar entry in the library list to reveal the library properties.
  1. Select the Native library location item.
  2. Click the Edit button.
  3. Navigate to the folder containing the Leap Motion native libraries.
On Windows, be sure to select the folder containing the correct libraries for your target architecture. If you are targeting a 32-bit JVM, use the Leap Motion libraries in the x86 folder of the SDK. If you are targeting a 64-bit JVM, use the libraries in the x64 folder. On Mac, each Leap Motion library file supports both architectures.
  1. Click Ok to set the path.

Note: you can also add the Leap Motion libraries to an existing project from the Project Properties dialog.

IntelliJ¶

In the IntelliJ IDE, you add the LeapJava.jar file to a project as a library. You separately set the path to the Leap Motion native libraries using the JVM parameter, java.library.path. The JVM parameters can be set using an IntelliJ Run/Debug configuration.

To add LeapJava.jar to the project:

  1. After creating a project in the usual way, select the File > Project Structure menu command to open the settings dialog.
  2. Click Libraries under project settings.
  3. Click the small + button at the top of the library list to open the Select Library Files dialog.
  4. Add LeapJava.jar from your Leap Motion SDK.

To set the path to the native Leap Motion libraries by creating a Run/Debug configuration:

  1. Select the Run > Edit Configurations… menu command.
  2. Click the small + button above the Configuration list.
  3. Choose Application to create a new application configuration.
  4. Assign a name.
  5. Set the VM Options field to set the -Djava.library.path parameter to the path to the proper folder containing the Leap Motion native libraries.
  6. Click Ok.
Java 2 Sdk MacJava 2 sdk mac os

On Windows, be sure to select the folder containing the correct libraries for your target architecture. If you are targeting a 32-bit JVM, use the Leap Motion libraries in the x86 folder of the SDK. If you are targeting a 64-bit JVM, use the libraries in the x64 folder. On Mac, each Leap Motion library file supports both architectures.

NetBeans¶

In the NetBeans IDE, you add the LeapJava.jar file to a project as a library. You separately set the path to the Leap Motion native libraries using the JVM parameter, java.library.path. The JVM parameters can be set using a NetBeans Run configuration.

To add the LeapJava.jar to a project and set the path to the native libraries:

  1. After creating a project in the usual way, select the File > Project Properties menu command to open the Project Properties dialog.
  2. Click the Libraries item.
  3. Click Add Jar/Folder button.
  4. Find the LeapJava.jar file in your Leap Motion SDK.
  5. Click Ok to add the Jar file to your project.
  6. Next, click the Run item in the Project properties list
  7. Set the VM Options field to set the -Djava.library.path parameter to the path to the proper folder containing the Leap Motion native libraries.

Java 2 Sdk Mac Os

On Windows, be sure to select the folder containing the correct libraries for your target architecture. If you are targeting a 32-bit JVM, use the Leap Motion libraries in the x86 folder of the SDK. If you are targeting a 64-bit JVM, use the libraries in the x64 folder. On Mac, each Leap Motion library file supports both architectures.