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

3

21

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
 ===================================================================
$  
Coxcomb answered 2/6, 2017 at 7:5 Comment(6)
Oracle JDK used to be there. I am not sure why it is no longer supported. OpenJDK is not an option for us.Hemorrhoidectomy
Yeah, it was removed due to the fact that oracle 6 & 7 needs oracle support account login to download. However, oracle java 8 does not, lets hope that they will get back oracle jdk option for latest version.Coxcomb
Here is the post related to it.Coxcomb
github issue for the reference!Coxcomb
It started supporting java 8, please check the output of sdk list javaCoxcomb
@RishikeshDarandale sdk list java and sdk ls java are the same command, aliased.Preheat
R
16

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

Revise answered 7/10, 2017 at 12:35 Comment(2)
Thanks @Derp. I already specified in my comments that it started supporting the Oracle java.Coxcomb
@RishikeshDarandale If the available answer is satisfactory, consider marking it as accepted.Rainie
A
12

Just for anyone stumbling upon this answer: You can still download Oracle JDK and extract it manually in the appropriate folder. After that you can use all the sdkman commands like if it was installed automatically.

Extract Oracle JDK to ~/.sdkman/candidates/java/8.0.241-oracle and activate using sdk use java 8.0.241-oracle.

2021 Edit: You no longer need to install/extract the manually downloaded binaries in the .sdkman folder. Just use local-path and provide the path where the binaries reside, e.g. sdk install groovy 2.4.13-local /opt/groovy-2.4.13

Alongside answered 21/2, 2020 at 20:57 Comment(5)
How do you that for the Mac? There is only a dmg package available, not a zip, which one should I use? I tried 1 of the linux tar zips, but it doesn't work (Eclipse doesn't recognize it)Derickderide
@Derickderide I would install the oracle jdk with the dmg file, look up the location where it is installed and symlink to the appropriate sdkman candidates folder. I think this is the only way because I am not aware of a way to tell sdkman where something is installed. There is only the one default install location.Alongside
This should be the top and accepted answer...and I really appreciated it. Now I can still use the version management SDKMAN provides with Oracle java. Splendid :)Nonrestrictive
Works fine with Java 11, this should be the accepted answer :)Whacking
This script helped me for the first part gist.github.com/smola/b1332103514a7834cabca6af7bb09cebYod
D
11

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.

Dreary answered 12/8, 2019 at 10:57 Comment(2)
the more relevant answer now is provided here - https://mcmap.net/q/599803/-how-to-specify-to-install-oracle-jdk-instead-of-openjdk-in-sdk-cli-on-ubuntu-17-04Dreary
hmm, oracle is listed in the CLI at the moment.Brodeur

© 2022 - 2024 — McMap. All rights reserved.