User avatar
Juraj.M
Posts: 4
Joined: Mon Dec 03, 2018 1:36 pm
Location: Slovakia
Contact: Website

Raspbian Stretch Lite - simple Oracle JRE installation

Mon Dec 03, 2018 2:18 pm

Hello,

What is the simplest way to install Java JRE? I don't need JDK.

I just want two things:
- I want to receive updates with apt-get upgrade
- I want fast JRE - so probably Oracle instead of Open JRE

Thank you!

DirkS
Posts: 9804
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Raspbian Stretch Lite - simple Oracle JRE installation

Mon Dec 03, 2018 4:07 pm

I can only see openjdk-x-jre in the repos.

Code: Select all

pi@raspiserver:~$ apt search openjdk-[8,9]-jre*
Sorting... Done
Full Text Search... Done
default-jre/stable 2:1.8-58+b2 armhf
  Standard Java or Java compatible Runtime

default-jre-headless/stable 2:1.8-58+b2 armhf
  Standard Java or Java compatible Runtime (headless)

openjdk-8-jre/stable 8u181-b13-2~deb9u1 armhf
  OpenJDK Java runtime, using Hotspot JIT

openjdk-8-jre-headless/stable 8u181-b13-2~deb9u1 armhf
  OpenJDK Java runtime, using Hotspot JIT (headless)

openjdk-8-jre-zero/stable 8u181-b13-2~deb9u1 armhf
  Alternative JVM for OpenJDK, using Zero/Shark

openjdk-9-jre/stable 9~b181-4~bpo9+rpt1 armhf
  OpenJDK Java runtime, using Hotspot JIT

openjdk-9-jre-headless/stable 9~b181-4~bpo9+rpt1 armhf
  OpenJDK Java runtime, using Hotspot JIT (headless)

knute
Posts: 414
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

Re: Raspbian Stretch Lite - simple Oracle JRE installation

Mon Dec 03, 2018 10:21 pm

Juraj.M wrote:
Mon Dec 03, 2018 2:18 pm
Hello,

What is the simplest way to install Java JRE? I don't need JDK.
Just install OpenJDK.
I just want two things:
- I want to receive updates with apt-get upgrade
So install OpenJDK.
- I want fast JRE - so probably Oracle instead of Open JRE
OpenJDK is the same code as Oracle now and it is just as fast. If you really want fast get OpenJDK11 from Shipilev.

User avatar
Juraj.M
Posts: 4
Joined: Mon Dec 03, 2018 1:36 pm
Location: Slovakia
Contact: Website

Re: Raspbian Stretch Lite - simple Oracle JRE installation

Mon Dec 03, 2018 10:28 pm

Thank you for the info!
I guess I'm gonna go for the OpenJDK after all :)

User avatar
HawaiianPi
Posts: 3843
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Raspbian Stretch Lite - simple Oracle JRE installation

Tue Dec 04, 2018 12:14 am

For Oracle Java 8 (ARMhf) there is a PPA that will install the latest version and keep it up to date. It does install the JDK, but that includes JRE (there is no JRE only install for ARM).

Open a terminal and do the following:

Code: Select all

sudo su
apt install dirmngr
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt update
apt install oracle-java8-installer
This will take a little while, and you'll have to agree to the Oracle terms, so pay attention.

Exit the root terminal and enter java -version to check your installed version (it should be the latest).

TinyZombie@CreeperPi3:~ $ java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) Client VM (build 25.191-b12, mixed mode)


Congrats, you now have the latest Java 8 version, and it will update with the rest of your packages.

For Raspbian Desktop, you can remove the older Java version with apt remove oracle-java8-jdk (but do that after installing the new one).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
Juraj.M
Posts: 4
Joined: Mon Dec 03, 2018 1:36 pm
Location: Slovakia
Contact: Website

Re: Raspbian Stretch Lite - simple Oracle JRE installation

Tue Dec 04, 2018 9:29 am

Thank you! Works well!
Seems like I have still much to learn (it's time to check the docs again).

When I have some time, I will try again the Open JDK and do my own benchmark using simple Play Framework app to compare performance.

Return to “Java”