19

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
  • 762
  • 4
  • 15
  • 33

2 Answers2

28

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,303
  • 1
  • 21
  • 23
drbcladd
  • 396
  • 3
  • 3
8

for example in ubuntu:

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