- Java Jdk Mac
- Java Runtime Mac
- Oracle Java 7 Mac Download
- Oracle Java Jdk Mac Download
- Java 1.7 Download Mac
This article shows you how to install Java on Mac OSX, and also how to do Java/JDK version switching.
Tested with
Download the file. Before the file can be downloaded, you must accept the license agreement. From either the Downloads window of the browser, or from the file browser, double click the file.dmg to launch it. A Finder window appears containing an icon of an open box and the name of the.app file. Java manual download page. Get the latest version of the Java Runtime Environment (JRE) for Windows, Mac, Solaris, and Linux. Oracle is the latest vendor under fire for (ahem) 'potentially unwanted' shovelware. Mac users installing or updating to the latest version Java are finding their shinies infected with the Ask. The post above is right: SQLDeveloper only runs under Java 8. This is counter-intuitive as other programs runs under at least X version of a software (not only X version).I kept downloading Java 11 with no luck.
- Mac OS 10.15.3
- JDK 8, 9, 10, 11, 12, 13 (AdoptOpenJDK)
Download Oracle JDK 8 from Oracle website. You need to accept license agreement to be able to download the file. Make sure you select the Mac OS X x64 platform (jdk-8u25-macosx-x64.dmg).
Note
On Mac OSX, Java should installed in this folder; it is Mac's standard.
We will show you two ways to install Java JDK on Mac, via the popular Homebrew package manager and manually installation.
1. Homebrew
1.1 Install Homebrew and update it.
1. Macbook pro 2012 el capitan. 2 Add adoptopenjdk/openjdk.
1.3 Find all available JDK.
The output may vary.
1.4 Java 8, 9, 10, 11, 12, 13, choose one to install.
This example will install Java 8 and 11 for testing.
1.5 Where Java is installed? /usr/libexec/java_home -V
Homebrew will install the JDK at folder /Library/Java/JavaVirtualMachines/
, and this folder is Mac's standard folder for Java installs.
1.6 Test it, by default, Mac takes the highest version.
1.7 How to do version switching? Refer to below 3. version switching
2. Manual installation
The example shows you how to download the early access JDK 14 and install it on Mac OSX.
Steps
- Download JDK.
- Puts the JDK folder at
/Library/Java/JavaVirtualMachines
. - Export
JAVA_HOME
.
2.1 Download the early access JDK 14 from the OpenJDK website.
2.2 Extracts tar file to /Library/Java/JavaVirtualMachines
2.3 Export JAVA_HOME
.
Find out where is JDK 14.
Create or edit the existing ~/.bash_profile
with a text editor.
Export JAVA_HOME
, save and exit.
Reflect the changes
Java Jdk Mac
2.4 Test it.
3. Version Switching
In this tutorial, we installed the Java 8 and Java 11 via Homebrew
(Step 1), and Java 14 manually (Step 2), so this Mac has three versions now. And the Mac is using the JDK 14.
Note
There are tools like jEnv to manage the Java version switching, but I prefer to manage with export JAVA_HOME
manually, it's simple and easy to understand, no black box magic.
Java Runtime Mac
3.1 Create or edit the existing ~/.bash_profile
with a text editor like vim or nano, export JAVA_HOME
to the specified JDK we want to use on Mac.
Create or edit the existing ~/.bash_profile
with a text editor.
Export JAVA_HOME
, save and exit.
Reflect the changes
Java Jdk Mac
2.4 Test it.
3. Version Switching
In this tutorial, we installed the Java 8 and Java 11 via Homebrew
(Step 1), and Java 14 manually (Step 2), so this Mac has three versions now. And the Mac is using the JDK 14.
Note
There are tools like jEnv to manage the Java version switching, but I prefer to manage with export JAVA_HOME
manually, it's simple and easy to understand, no black box magic.
Java Runtime Mac
3.1 Create or edit the existing ~/.bash_profile
with a text editor like vim or nano, export JAVA_HOME
to the specified JDK we want to use on Mac.
The above changes will make JAVA_HOME
point to JAVA 8.
3.2 Reflect the changes.
Done.
If we want to switch JDK version again, update the ~/.bash_profile
and export JAVA_HOME
to other JDK version.