Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify to install oracle jdk instead of openjdk in sdk cli on ubuntu 17.04?

Tags:

When using sdkman on uBuntu 17.04, I do not see an option to install the oracle jdk. How to specify to install oracle jdk using sdkman on uBuntu 17.04?

$sdk list java
 ===================================================================
 Available Java Version
 ===================================================================
 > * 8u131-zulu                                                                    
     7u141-zulu                                                                    
     6u93-zulu 


 ===================================================================
 + - local version
 * - installed
 > - currently in use
 ===================================================================
$  
like image 870
Rishikesh Darandale Avatar asked Jun 02 '17 07:06

Rishikesh Darandale


People also ask

Can OpenJDK replace Oracle JDK?

Oracle JDK 11 and OpenJDK 11 will be interchangeable. There are some differences between Oracle JDK 1.8 and OpenJDK 1.8, although the gap is shrinking.

How to install Oracle Java JDK 17 on Linux?

Then, download Oracle Java JDK 17 using the wget command in the terminal. And then, install Oracle Java JDK 17 using the rpm command. First, download Oracle Java JDK 17 using the wget command in the terminal. Then, install Oracle Java JDK 17 using the dpkg command.

Do I need to remove OpenJDK to install Oracle Java?

You don't need to remove openjdk in order to use / install the oracle's jdk. Just install the oracle's jdk and configure which java you want to use by configuring it with: Show activity on this post. Tested in Ubuntu 14.04/16.04. In three steps:

What version of OpenJDK is installed on Ubuntu?

Ubuntu 22.04 default repository provides the OpenJDK version 18, 17, 11, and 8 packages. You can use the APT package manager to install your desired Java version on your system. After the installation, verify the active version of OpenJDK using the following command:

What is the latest version of Java JDK?

This newest release includes JDK 17 that provides a development environment for building applications using the Java programing language and testing and running the Java programs. Here, we will see how to install Java JDK 17 on Linux (CentOS, Ubuntu, Debian, and Fedora).


2 Answers

You can type sdk ls java and see which versions are available.

At the moment I see 8u141-oracle in the list. So you can install it by sdk i java 8u141-oracle

like image 192
Kirill Avatar answered Oct 20 '22 04:10

Kirill


Currently Oracle JDKs has finally been pulled out from SDKMAN due to some legal issues. The legal issues are explained over here

They have decided to introduce a lot of OpenJDK implementations like Azul Zulu, Azul ZuluFX for those who need JavaFX along with it. Please check with sdk ls java to find out what more are supported as of now.

like image 27
Joseph T F Avatar answered Oct 20 '22 03:10

Joseph T F