OS/Raspberry Pi
Raspberry Pi 4 : JDK 수동 설치
파란크리스마스
2021. 10. 23. 21:43
728x90
출처
압축풀기
pi@raspberrypi:~$ tar xvf jdk-8u202-linux-arm32-vfp-hflt.tar.gz
jdk 디렉토리 이동
pi@raspberrypi:~$ sudo mkdir /usr/local/java
pi@raspberrypi:~$ sudo mv jdk1.8.0_202/ /usr/local/java/
java를 기본 명령어로 등록
pi@raspberrypi:~$ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.8.0_202/bin/java" 1; update-alternatives: using /usr/local/java/jdk1.8.0_202/bin/java to provide /usr/bin/java (java) in auto mode pi@raspberrypi:~$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.8.0_202/bin/javac" 1; update-alternatives: using /usr/local/java/jdk1.8.0_202/bin/javac to provide /usr/bin/javac (javac) in auto mode pi@raspberrypi:~$ ls -al /usr/bin/java lrwxrwxrwx 1 root root 22 Oct 23 22:04 /usr/bin/java -> /etc/alternatives/java
pi@raspberrypi:~$ sudo update-alternatives --set java /usr/local/java/jdk1.8.0_202/bin/java; pi@raspberrypi:~$ sudo update-alternatives --set javac /usr/local/java/jdk1.8.0_202/bin/javac;
설치확인
pi@raspberrypi:~$ java -version java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) Server VM (build 25.202-b08, mixed mode)