-
우분투에 자바 설치 후 환경변수 설정하기인프라/vmware 2024. 1. 5. 20:06
가상머신에 ubuntu를 설치해 놓은 상황입니다.
가상머신을 새로 만들 때 마다 반복해야되서 자바 설치하는 과정을 적어봅니다.
1. jre 설치하기
$ sudo apt-get upate $ sudo apt-get install default-jre
2. 자바 설치 경로 확인하기
$ update-java-alternatives -l // /usr/lib/jvm/java-1.11.0-openjdk-arm64
3. 환경변수 파일에 JAVA_HOME을 등록하기
$ sudo nano /etc/environment
JAVA_HOME=<위에서 찾은 경로> 를 추가합니다.
'인프라 > vmware' 카테고리의 다른 글
ssh를 사용한 호스트와 가상환경 통신 (0) 2024.01.05 가상 환경 구축 (0) 2024.01.05