# Java: vol1: [java / JDK version control best practice]

# Java: vol1: [java / JDK version control best practice]

background

It became necessary to switch versions when using the latest java and scala for jdk 1.8.0 series projects and individuals. I used to use jEnv a long time ago, but since the settings were complicated, I reviewed it and found a version control tool called sdkman, which was very easy to use. ..

sdkman How to install

** How to install sdkman **

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
➜  ~ sdk list java                    
================================================================================
Available Java Versions
================================================================================
 Vendor        | Use | Version      | Dist    | Status     | Identifier
--------------------------------------------------------------------------------
 AdoptOpenJDK  |     | 14.0.0.j9    | adpt    |            | 14.0.0.j9-adpt
               |     | 14.0.0.hs    | adpt    |            | 14.0.0.hs-adpt
               |     | 13.0.2.j9    | adpt    |            | 13.0.2.j9-adpt
               |     | 13.0.2.hs    | adpt    |            | 13.0.2.hs-adpt
               |     | 12.0.2.j9    | adpt    |            | 12.0.2.j9-adpt
               |     | 12.0.2.hs    | adpt    |            | 12.0.2.hs-adpt
               |     | 11.0.6.j9    | adpt    |            | 11.0.6.j9-adpt
               |     | 11.0.6.hs    | adpt    |            | 11.0.6.hs-adpt
               |     | 8.0.242.j9   | adpt    |            | 8.0.242.j9-adpt
               |     | 8.0.242.hs   | adpt    |            | 8.0.242.hs-adpt
 Amazon        |     | 11.0.6       | amzn    |            | 11.0.6-amzn
               |     | 13.0.2       | librca  |            | 13.0.2-librca
               |     | 12.0.2       | librca  |            | 12.0.2-librca
               |     | 11.0.6.fx    | librca  |            | 11.0.6.fx-librca
               |     | 11.0.6       | librca  |            | 11.0.6-librca
               |     | 8.0.242.fx   | librca  |            | 8.0.242.fx-librca
               |     | 8.0.242      | librca  |            | 8.0.242-librca
 GraalVM       |     | 20.0.0.r11   | grl     |            | 20.0.0.r11-grl
               |     | 20.0.0.r8    | grl     |            | 20.0.0.r8-grl
               |     | 19.3.1.r11   | grl     |            | 19.3.1.r11-grl
               |     | 19.3.1.r8    | grl     |            | 19.3.1.r8-grl
               |     | 19.3.0.r11   | grl     |            | 19.3.0.r11-grl
               |     | 19.3.0.r8    | grl     |            | 19.3.0.r8-grl
               |     | 19.3.0.2.r11 | grl     |            | 19.3.0.2.r11-grl
               |     | 19.3.0.2.r8  | grl     |            | 19.3.0.2.r8-grl
               |     | 19.2.1       | grl     |            | 19.2.1-grl
               |     | 19.1.1       | grl     |            | 19.1.1-grl
               |     | 19.0.2       | grl     |            | 19.0.2-grl
               |     | 1.0.0        | grl     |            | 1.0.0-rc-16-grl
 Java.net      |     | 15.ea.15     | open    |            | 15.ea.15-open
               |     | 14.0.0       | open    |            | 14.0.0-open
               |     | 13.0.2       | open    |            | 13.0.2-open
               |     | 12.0.2       | open    |            | 12.0.2-open
               |     | 11.0.2       | open    |            | 11.0.2-open
               |     | 10.0.2       | open    |            | 10.0.2-open
               |     | 9.0.4        | open    |            | 9.0.4-open
 SAP           |     | 13.0.2       | sapmchn |            | 13.0.2-sapmchn
               |     | 12.0.2       | sapmchn |            | 12.0.2-sapmchn
               |     | 11.0.6       | sapmchn |            | 11.0.6-sapmchn
================================================================================
Use the Identifier for installation:

    $ sdk install java 11.0.3.hs-adpt
================================================================================

JDK 1.8.0 How to install

** Install java using sdkman **

sdk install java 8.0.242.j9-adpt

➜  ~ java -version                                                                                                                                                                                                                              ()
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
Eclipse OpenJ9 VM (build openj9-0.18.1, JRE 1.8.0 Mac OS X amd64-64-Bit Compressed References 20200122_439 (JIT enabled, AOT enabled)
OpenJ9   - 51a5857d2
OMR      - 7a1b0239a
JCL      - 8cf8a30581 based on jdk8u242-b08)

Support list

sdkman also supports various other JDKs and SDKs. See below for details

Recommended Posts

# Java: vol1: [java / JDK version control best practice]
# Java: vol1: [java / JDK version control best practice]
[Rails version control] rails version downgrade
Java version control on macOS
Java version control with jenv
Java version control with jenv on OSX
Java version control using cask + anyenv + jenv
Java installation (Mac, Homebrew, multiple version control)
Java control syntax
Java control syntax
Java installation jdk
Java version check
java practice part 1
[Java] Check the JDK version of the built war file
[Java] Convert PDF version
Java version notation comparison
[Java] Control syntax notes
Rock-paper-scissors game java practice
Scraping practice using Java ②
Java8 Stream API practice
Scraping practice using Java ①
[Rails version control] rails version downgrade