Help us understand the problem. What is going on with this article?

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

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

PINTO
英文の誤り、日本文の誤り、ご指摘願います。 分かりにくい部分は積極的にご質問・コメントください。 折を見て記事を修正します。 貧乏ホビープログラマ。 Intel Software Innovator Program member
https://gitstar-ranking.com/PINTO0309
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした