2

Now I am using sdkman to install jdk from internet failed, because of the network access problem, I could not install jdk. Now I want to using sdkman instal sdk from local. I think the procedure would like this:

  1. download jdk tar.gz file from internet
  2. copy the file to some folder
  3. using sdkman to install jdk from local path

is it possible? I have already download jdk like this:

wget -c https://mirrors.tuna.tsinghua.edu.cn/AdoptOpenJDK/11/jdk/x64/linux/OpenJDK11U-jdk_x64_linux_hotspot_11.0.11_9.tar.gz
Dolphin
  • 609

2 Answers2

5

If you want to use your own directory you can run this command

sdk install java 1.9 /home/xxx/java/jdk/jdk-9.0.4

Then on the list will look as unclassified

sdk list java
           |     | 6.0.119      | zulu    | installed  | 6.0.119-zulu        

Unclassified | >>> | 1.9 | none | local only | 1.9

Then use it

sdk use java 1.9
cabaji99
  • 151
1

All the JAVA JDK files will be extracted to candidates/java directory.

  • You can extract the required jdk directory into
    ${SDKMAN_DIR}/candidates/java/.
    
  • In linux it will be in general .sdkman in /home/<user>
    /home/user/.sdkman/candidates/java
    
  • It will be shown as unclassified.
    sdk list java
    

    ===== Available Java Versions=================

    Vendor | Use | Version | Dist | Status | Identifier

    Unclassified | >>> | dcevm | none | local only | dcevm-11.0.11_1

Use the following command to install it permanently:

sdk default java dcevm-11.0.11_1

Then set the JAVA_HOME path if required.

AdminBee
  • 22,803
chrollo
  • 26