13

I'm using a non-public JDK legacy version - precisely jdk-6u171 and I'm wondering if there is a way to list and use my locally installed versions with sdkman.

My current results to sdk list java:

===================================================================
Available Java Versions
==================================================================
    9.0.7-zulu                                                                    
    9.0.4-openjdk                                                                 
    8.0.172-zulu                                                                  
> * 8.0.171-oracle                                                                
    7.0.181-zulu                                                                  
    6.0.107-zulu                                                                  
    10.0.1-zulu                                                                   
  * 10.0.1-oracle                                                                 
    10.0.0-openjdk                                                                
    1.0.0-rc1-graal            

What I meant is: to show this installed version here in this list and also to be able to execute, for example, sdk use java 6.0.171-custom

Is there a way to have it?

Thanks in advance,

Regards.

Community
  • 1
  • 1
Fernando Barbeiro
  • 592
  • 3
  • 9
  • 29

2 Answers2

15

By the Usage documents, a local version of an sdk can be installed with

sdk install <sdk> <local-version-name> <path-to-local-installation>

see Usage

David Groomes
  • 2,115
  • 19
  • 20
drbcladd
  • 166
  • 1
  • 3
3

for example in ubuntu:

sdk install java java241 '/home/srdr/java/jdk-8u241-linux-x64/jdk1.8.0_241'
serdarsen
  • 73
  • 1
  • 8