alnaseh
Posts: 60
Joined: Thu Jun 23, 2016 5:12 am

java is not supported any more on Pi0 with OS buster

Wed Jun 26, 2019 6:37 am

OK, this is surprising, the OS team adopted the new java 11 in buster as the default java but it is not supported anymore in the old armv6 (pi0).

this is like discontinuing java totally for Pi zero

the topic is been discussed previously in:
https://www.raspberrypi.org/forums/view ... p?t=196887
https://www.raspberrypi.org/forums/view ... 4#p1461934

there is no way out of this except going back to java 8 in buster

alnaseh
Posts: 60
Joined: Thu Jun 23, 2016 5:12 am

Re: java is not supported any more on Pi0 with OS buster

Wed Jun 26, 2019 6:40 am

also please find the installation error:

Code: Select all

update-alternatives: using /usr/lib/jvm/java-11-openjdk-armhf/bin/jmod to provide /usr/bin/jmod (jmod) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-armhf/bin/jps to provide /usr/bin/jps (jps) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-armhf/bin/jrunscript to provide /usr/bin/jrunscript (jrunscript) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-armhf/bin/jshell to provide /usr/bin/jshell (jshell) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-armhf/bin/jstack to provide /usr/bin/jstack (jstack) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-armhf/bin/jstat to provide /usr/bin/jstat (jstat) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-armhf/bin/jstatd to provide /usr/bin/jstatd (jstatd) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-armhf/bin/rmic to provide /usr/bin/rmic (rmic) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-armhf/bin/serialver to provide /usr/bin/serialver (serialver) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-armhf/bin/jhsdb to provide /usr/bin/jhsdb (jhsdb) in auto mode
Setting up ca-certificates-java (20190405) ...
head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
Error occurred during initialization of VM
Server VM is only supported on ARMv7+ VFP
dpkg: error processing package ca-certificates-java (--configure):
 installed ca-certificates-java package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for systemd (241-5+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for ca-certificates (20190110) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

Error occurred during initialization of VM
Server VM is only supported on ARMv7+ VFP
E: /etc/ca-certificates/update.d/jks-keystore exited with code 1.
done.
Errors were encountered while processing:
 ca-certificates-java
E: Sub-process /usr/bin/dpkg returned an error code (1)
[email protected]:~ $ java
Error occurred during initialization of VM
Server VM is only supported on ARMv7+ VFP

Heater
Posts: 13062
Joined: Tue Jul 17, 2012 3:02 pm

Re: java is not supported any more on Pi0 with OS buster

Wed Jun 26, 2019 9:37 am

Got'a love Java "Compile once, run anywhere".

Really, get into bed with a company and their proprietary language and you will be s....ed eventually. I have seen it happen many times.

I imagine that the best course of action, on the Pi or any other platform, is to ensure your code works with Open Source solutions.

What is wrong with OpenJDK?

In the long run use a language with a proper standard behind it to ensure longevity of your code base.

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

Re: java is not supported any more on Pi0 with OS buster

Thu Jun 27, 2019 9:05 pm

Buster, openjdk-11-jdk, openjdk-11-jre-zero and the -zero command line option is all that's needed. It is really slow in a Zero though.

bullen
Posts: 283
Joined: Sun Apr 28, 2013 2:52 pm

Re: java is not supported any more on Pi0 with OS buster

Thu Jul 04, 2019 10:27 am

Ok, but how does one fix a broken installation?

Uninstall the non -zero jre? Nope!

Ok, it's obviously time for us to learn how to compile Java from scratch!

Just had a google and what do you know: https://stackoverflow.com/questions/311 ... n-and-orac
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

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

Re: java is not supported any more on Pi0 with OS buster

Wed Jul 17, 2019 2:13 pm

So there is an interesting fault when openjdk-11 is installed on a Pi0 or Pi1. The script that sets the ca-certificates doesn't run because it call java without the -zero option and fails. This causes it to fail doing some things that require use of the certificate (eg. java.mail).

Today I'm going to try installing the openjdk to the OS when it is running on a Pi3 and then taking the chip to a Pi1 and see if it works then.

Will report back.

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

Re: java is not supported any more on Pi0 with OS buster

Wed Jul 17, 2019 3:53 pm

knute wrote:
Wed Jul 17, 2019 2:13 pm
So there is an interesting fault when openjdk-11 is installed on a Pi0 or Pi1. The script that sets the ca-certificates doesn't run because it call java without the -zero option and fails. This causes it to fail doing some things that require use of the certificate (eg. java.mail).

Today I'm going to try installing the openjdk to the OS when it is running on a Pi3 and then taking the chip to a Pi1 and see if it works then.

Will report back.
openjdk-11 does install without error when run on a Pi3. That error however doesn't seem to be the reason that java mail doesn't work on a Pi1 with openjdk-11. I'm going to start a new thread on that.

alnaseh
Posts: 60
Joined: Thu Jun 23, 2016 5:12 am

Re: java is not supported any more on Pi0 with OS buster

Sun Aug 04, 2019 4:23 pm

problem is solved. OpenJDK 11 is available for Pi0 armv6 from zulu:
https://www.azul.com/downloads/zulu-embedded/

it works out of the box. i need to test its performance against oracle jdk8, but initially it works.

i tried as well adoptopenjdk without success.

in addition, bell-sw.com has also a release for pi0 armv6 but it is available only for commercial use (not free)

good, i can still derive more from the old chip

Valerie9
Posts: 1
Joined: Wed Aug 21, 2019 5:09 am

Re: java is not supported any more on Pi0 with OS buster

Wed Aug 21, 2019 5:11 am

So there is an interesting fault when openjdk-11 is installed on a Pi0 or Pi1 tellsubway. The script that sets the ca-certificates doesn't run because it call java without the -zero option and fails.

Return to “Java”