본문 바로가기

IT

Centos, 리눅스 java 버전 변경 방법

반응형

Centos, linux java version 변경 방법

※ 원하는 java 버전을 설치한 상태!

$sudo alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           java-1.8.0-openjdk.aarch64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.382.b05-2.0.1.el8.aarch64/jre/bin/java)
   2           java-17-openjdk.aarch64 (/usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.0.1.el8.aarch64/bin/java)

Enter to keep the current selection[+], or type selection number: 2 ########### 원하는거 입력