LoginSignup
2
3

More than 3 years have passed since last update.

[Unstable] How to install openjdk-8-jdk on Debian Buster (Debian 10) armhf

Last updated at Posted at 2019-08-13

Bazel_bin GitHub stars

1.Introduction

[October 20, 2019] This procedure is deprecated at this time. Click here for the stable procedure. [Stable] Install openjdk-8-jdk safely in Raspbian Buster (Debian 10) environment

In Debian Buster (Debian 10), openjdk-8-jdk is excluded from the supported packages. The procedure for installing openjdk-8-jdk is described below. The same procedure works for other architectures such as aarch64 and x86_64 and other.

Click here for the procedure by Raspbian Buster.

2.Procedure

Edit_sources.list
$ sudo nano /etc/apt/sources.list

Add the following deb http://... to the bottom line.

Add_the_following_line
deb http://deb.debian.org/debian/ sid main

Quit Nano editor.
Ctrl+O
Ctrl+X

Install_openjdk-8-jdk
$ sudo apt-get update
$ sudo apt-get install -y openjdk-8-jdk
Java_version_switch
$ sudo update-alternatives --config java

There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-11-openjdk-armhf/bin/java      1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-armhf/bin/java      1111      manual mode
  2            /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java   1081      manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
Javac_version_switch
$ sudo update-alternatives --config javac
There are 2 choices for the alternative javac (providing /usr/bin/javac).

  Selection    Path                                          Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-11-openjdk-armhf/bin/javac   1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-armhf/bin/javac   1111      manual mode
  2            /usr/lib/jvm/java-8-openjdk-armhf/bin/javac    1081      manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
Java_version_check
$ java -version

openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1-b10)
OpenJDK Client VM (build 25.222-b10, mixed mode)

$ javac -version
javac 1.8.0_222
Edit_sources.list
$ sudo nano /etc/apt/sources.list

Delete the following deb http://... from the bottom line.

Delete_the_following_line
deb http://deb.debian.org/debian/ sid main

Quit Nano editor.
Ctrl+O
Ctrl+X

$ sudo apt-get update

3.Reference articles

https://novicestuffs.wordpress.com/2017/04/25/how-to-uninstall-java-from-linux/
https://stackoverflow.com/questions/57031649/how-to-install-openjdk-8-jdk-on-debian-10-buster

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3