Java version 8 JDK 설치하기 (Ubuntu16.04)

2019. 5. 1. 17:45꿀팁 분석 환경 설정/Linux 관련 팁

** 유용하셨다면 공감버튼 한번씩 눌러주세요**

sudo apt-get install openjdk-8-jre
sudo apt-get install openjdk-8-jdk
sudo update-alternatives --config java
## 환경변수 설정
which javac
readlink -f /usr/bin/javac
sudo nano /etc/profile
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
export CLASS_PATH=$JAVA_HOME/lib:$CLASS_PATH
# profile reload
source /etc/profile 
sudo reboot now
echo $JAVA_HOME
$JAVA_HOME/bin/javac -version

 

728x90