Technical docs > Configuring Android Studio: IDE & VM Options, JDK, etc > Mac OSX JDK Selection
|
There are various tricky issues with having multiple versions of Java (Apple's own Java 6 and Oracle JDK 7 or even 8) on one's Mac OS X system, and using different versions for different applications. I spent some time writing up my experience of my experience of installing and configuring various versions of JDK on Mac OS X 10.9.2. After installing Java for macOS 2012-006, can I continue to use Apple's Java 6 alongside the macOS JDK for Java 12? 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. Liberica JDK provides Long term Support for all of its open source builds that act as alternatives for Java application development toolkits. The Liberica OpenJDK package with the HotSpot Virtual Machine viably replaces the Java 8 (LTS), 9, 10, 11 (LTS), 12, 13, 14, 15.
JDK 9 & Later
Oracle's OpenJDK JDK binaries for Windows, macOS, and Linux areavailable on release-specific pages of jdk.java.net as
.tar.gz
or.zip
archives.As an example, the archives for JDK 13 may be found on jdk.java.net/13 and may be extractedon the command line using
$ tar xvfopenjdk-13*_bin.tar.gz
or
$ unzipopenjdk-13*_bin.zip
depending on the archive type.
JDK 8
Debian, Ubuntu,etc.
On the command line, type:
$ sudo apt-get installopenjdk-8-jre
The
openjdk-8-jre
package containsjust the Java Runtime Environment. If you want to develop Javaprograms then please install the openjdk-8-jdk
package.Download Jdk 6 For Mac
Fedora, OracleLinux, Red Hat Enterprise Linux, etc.
On the command line, type:
$ su -c 'yum installjava-1.8.0-openjdk'
The
java-1.8.0-openjdk
packagecontains just the Java Runtime Environment. If you want to developJava programs then install the java-1.8.0-openjdk-devel
package.JDK 7
Debian, Ubuntu,etc.
On the command line, type:
$ sudo apt-get installopenjdk-7-jre
The
openjdk-7-jre
package containsjust the Java Runtime Environment. If you want to develop Javaprograms then install the openjdk-7-jdk
package.Jdk 1.6 For Mac
Fedora, OracleLinux, Red Hat Enterprise Linux, etc.
On the command line, type:
$ su -c 'yum installjava-1.7.0-openjdk'
The
java-1.7.0-openjdk
packagecontains just the Java Runtime Environment. If you want to developJava programs then install the java-1.7.0-openjdk-devel
package.JDK 6
Debian, Ubuntu,etc.
On the command line, type:
Java 6 For Mac Download
$ sudo apt-get installopenjdk-6-jre
The
openjdk-6-jre
package containsjust the Java Runtime Environment. If you want to develop Javaprograms then install the openjdk-6-jdk
package.Fedora, OracleLinux, Red Hat Enterprise Linux, etc.
On the command line, type:
$ su -c 'yum installjava-1.6.0-openjdk'
The
java-1.6.0-openjdk
packagecontains just the Java Runtime Environment. If you want to developJava programs then install the java-1.6.0-openjdk-devel
package.Jdk 6 For Mac
![Mac Mac](/uploads/1/1/7/7/117755721/664664199.jpg)
BSD Port
Jdk 6 For Mac
For a list of pointers to packages of the BSD Port forDragonFly BSD, FreeBSD, Mac OS X, NetBSD and OpenBSD, please seethe BSD porting Project's wikipage.