Ununtu에서 openjdk 설치

hjeun0111·2022년 9월 26일
0

제가 사용중인 컴퓨터의 OS는 Ubuntu 20.04 LTS 버전임
(OS가 Ubuntu라면 OS 버전확인은 아래 명령어로 확인 가능해요)

  • Ubuntu 버전 확인하기
$ cat /etc/issue
Ubuntu 20.04.5 LTS \n \l
  • 패키지 저장소 인덱스 업데이트 하기
$ sudo apt update && sudo apt upgrade -y
  • 설치할 jdk버전과 패키지 이름 찾기
    (java를 설치할 것이기 때문에 openjdk를 찾아봅니다)
$ apt-cache search openjdk

default-jdk - Standard Java or Java compatible Development Kit
default-jdk-doc - Standard Java or Java compatible Development Kit (documentation)
default-jdk-headless - Standard Java or Java compatible Development Kit (headless)
default-jre - Standard Java or Java compatible Runtime
default-jre-headless - Standard Java or Java compatible Runtime (headless)
openjdk-11-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-11-doc - OpenJDK Development Kit (JDK) documentation
openjdk-11-jdk - OpenJDK Development Kit (JDK)
openjdk-11-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-11-jre - OpenJDK Java runtime, using Hotspot JIT
 ... (생략) ...
openjdk-17-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-17-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-17-doc - OpenJDK Development Kit (JDK) documentation
openjdk-17-jdk - OpenJDK Development Kit (JDK)
openjdk-17-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-17-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-17-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-17-jre-zero - Alternative JVM for OpenJDK, using Zero
openjdk-17-source - OpenJDK Development Kit (JDK) source files
openjdk-8-jdk - OpenJDK Development Kit (JDK)
openjdk-8-jdk-headless - OpenJDK Development Kit (JDK) (headless)
  • 원하는 java 버전을 목록 찾아서 설치하기
    (저는 17버전을 설치하려고 합니다)
$ sudo apt-get install openjdk-17-jdk	

완료!!

profile
I'm a software engineer

0개의 댓글