0

I am trying to install java 12 on my pi. I can only use the terminal. Any Ideas what I have to do? it seems that java 12 isnt in the Repositorys.

Thank you in advance

asked Nov 18, 2019 at 14:55
1

2 Answers 2

1

If you are using Ubuntu try this:

sudo apt install openjdk-12-jdk

Use the following command to verify the installed version of Java on your system.

java -version

If you are using Debian try this:

Create a new Apt configuration file /etc/apt/sources.list.d/java-13-debian.list, and edit in text editor.

sudo vim /etc/apt/sources.list.d/java-13-debian.list

and add following content in it.

deb http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic main
deb-src http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic main

Now import GPG key on your system for validating packages before installing them.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EA8CACC073C3DB2A

Run the following commands to update apt-cache and then install Java 13 on the Debian system using the apt-get package manager.

sudo apt-get update
sudo apt-get install oracle-java13-installer

Use the following command to verify the installed version of Java on your system.

java -version
java version "13" 2019年09月17日
Java(TM) SE Runtime Environment (build 13+33)
Java HotSpot(TM) 64-Bit Server VM (build 13+33, mixed mode, sharing)
answered Nov 19, 2019 at 10:56
1
  • But on Debian/Raspbian (that's what the OP use) it will install version 13 and not version 12 as asked. Commented Nov 19, 2019 at 18:51
0

I'm using the BellSoft Liberica JDK's on Raspbian.

If you start from a fresh Raspbian you will have version 11

$ java -version
openjdk version "11.0.3" 2019年04月16日
OpenJDK Runtime Environment (build 11.0.3+7-post-Raspbian-5)
OpenJDK Server VM (build 11.0.3+7-post-Raspbian-5, mixed mode)

Easiest way to install:

  • Visit https://bell-sw.com/
  • Look for the version you want to use for "Linux ARM v7 & v8 32 bit HardFloat"
  • Copy the link location to the deb-file
  • Run the following script (is for the version 12.0.2 you are looking for)
  • Check if the version installed correctly by running "java -version" again

$ cd /home/pi

$ wget https://download.bell-sw.com/java/12.0.2/bellsoft-jdk12.0.2-linux-arm32-vfp-hflt.deb

$ sudo apt-get install ./bellsoft-jdk12.0.2-linux-arm32-vfp-hflt.deb

$ sudo update-alternatives --config javac

$ sudo update-alternatives --config java

answered Nov 20, 2019 at 21:08
2
  • 1
    You downloaded bellsoft-jdk12.0.2-linux-arm32-vfp-hflt.deb (jdk12) and installed bellsoft-jdk13-linux-arm32-vfp-hflt.deb (jdk13)? Really? Commented Nov 21, 2019 at 10:49
  • Sorry @Ingo my mistake, copy/paste and only half adapted ;-) Fixed now! Commented Nov 21, 2019 at 10:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.