Beezer
Posts: 2
Joined: Sun Jan 19, 2020 11:45 pm

Pi Zero w and Java

Fri Mar 27, 2020 4:56 am

Hi Folks,

I'm fiddling with a Pi Zero and having issues with Java. I was trying to play around with the temperature-machine package of which Java seems to be a dependency. I keep getting errors such as:
Error occurred during initialization of VM
Server VM is only supported on ARMv7+ VFP
I've tried:
sudo apt-get install openjdk-8-jdk
but still get the same issues.

Running Raspbian:
Version: February 2020
Release date: 2020-02-13
Kernel version: 4.19

Any advice? I've tried removing java installations but I'm not exactly sure how to remove all traces of it. I thought maybe if I could clean slate the java installs, I could then try to reinstall the opensdk 8 and it might work

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

Re: Pi Zero w and Java

Mon Mar 30, 2020 6:30 pm

There is a problem with Pi 0s and 1s with newer Javas. There are four openjdks available in the repository, 8, 9, 10 and 11. 8, 9 and 10 will run on a Pi 0 if you install openjdk-?-jre-zero and use the -zero command line option. openjdk-8 also appears to run without that on a Pi 0. There is no openjdk-11-jre-zero in the repository. 9, 10 and 11 won't run on a Pi 0 without the -zero command line option. openjdk-10 and openjfx11 work together. Using the -zero option is extremely slow! Azul's JDK 11.0.6 works fine on a Pi 0 but I can't get it to work with openjfx.

That said if your program calls Java without the -zero option it isn't going to run. You could maybe modify where java resolves to and point it to java -zero.

Bellsoft, bell-sw.com, says they have ARMv6 versions of their Liberica JDK available. I haven't contacted them to find out if they are free.

Return to “Java”