Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- grep
- resource
- maVen
- port
- ssh
- import
- Windows
- copy-dependencies
- Quartz
- Eclipse
- 공통표준용어
- Windows 10
- netsh
- profile
- Mac
- xargs
- 네트워크
- find
- JavaScript
- lsof
- tomcat
- GIT
- 단축키
- bash
- web.xml
- DB 도메인
- context
- VirtualBox
- IntelliJ
- Source
Archives
- Today
- Total
develog
[bash] update-java-alternatives 본문
현재 버전 확인하기
# update-java-alternatives --list
java-1.11.0-openjdk-amd64 1111 /usr/lib/jvm/java-1.11.0-openjdk-amd64
java-1.17.0-openjdk-amd64 1711 /usr/lib/jvm/java-1.17.0-openjdk-amd64
java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64
# java -version
openjdk version "17.0.10" 2024-01-16
OpenJDK Runtime Environment (build 17.0.10+7-Ubuntu-122.04.1)
OpenJDK 64-Bit Server VM (build 17.0.10+7-Ubuntu-122.04.1, mixed mode, sharing)
# javac -version
javac 17.0.10
다른 버전으로 변경하기
# update-java-alternatives --set java-1.8.0-openjdk-amd64
# java -version
openjdk version "1.8.0_392"
OpenJDK Runtime Environment (build 1.8.0_392-8u392-ga-1~22.04-b08)
OpenJDK 64-Bit Server VM (build 25.392-b08, mixed mode)
# javac -version
javac 1.8.0_392
Comments