I’ve recently been playing with the early-access version of Zulu Embedded for ARM32. Zulu is an open-source and certified build of OpenJDK. It is a great alternative to the JRE from Oracle as it does not requires you to pay any licenses, and it is also a huge improvement over the OpenJDK build you can get off the Debian repositories, which is not really optimized for ARM (and that’s a euphemism! :smile:).
Before giving you more information on my experience running Eclipse IoT projects on Zulu in subsequent blog posts, here’s a quick tip for anyone interested in installing an alternate JVM on a Raspberry Pi (or pretty much any Linux-based environment, really), and switching between default JVMs easily.
Download the Zulu JVM
At the time of writing this blog post, Zulu for ARM32 is only available through an early access program. Once you’ve downloaded your Zulu archive, you need to unpack it somewhere on your system (in a zulu
folder within our home directory, in this example). From the command-line, and while in the directory where you’ve downloaded Zulu:
mkdir ~/zulu tar xvfpz ezre-1.8.0_60-8.9.0.6-cp1-eval-linux_aarch32.tar.gz -C ~/zulu
Add the Zulu JVM to the list of alternate VMs
The update-alternatives
command-line utility allows to easily bind a given symbolic name to different commands. In our case, we want to update the symbolic link for /usr/bin/java
sudo update-alternatives --install /usr/bin/java java ~/zulu/ezre-1.8.0_60-8.9.0.7-cp3-eval-linux_aarch32/bin/java 100
Enable Zulu
sudo update-alternatives --config java
In the list of alternative Java version that’s proposed to you, select the one corresponding to Zulu by entering its ID and pressing
And voila! Zulu is now your default Java Virtual Machine, you can check by executing the following command:
java -version
openjdk version "1.8.0_60-Zulu-Embedded" OpenJDK Runtime Environment (build 1.8.0_60-Zulu-Embedded-EA3, profile compact1) OpenJDK Minimal VM (build 25.60-b23, mixed mode, Evaluation)
5 replies on “Installing the Zulu open source Java Virtual Machine on Raspberry Pi”
Hi Benjamin,
I can confirm that Azul Embedded runs very smooth. I did some testing with it for the presentation of running Eclipse SmartHome on Concierge, see https://www.eclipsecon.org/europe2016/session/getting-next-level-eclipse-concierge
I did run the compact2 profile, and noticed that Java Debugger support is missing in compact2 profile. Did you had same experience?
didn’t work for me. says no such file or directory. i checked all the symbolic links and they work out fine. java is configured as e’x’ecutable.
lrwxrwxrwx 1 root root 22 Feb 10 06:40 java -> /etc/alternatives/java
lrwxrwxrwx 1 root root 70 Feb 10 06:40 java -> /home/chip/zulu/ezdk-1.8.0_112-8.19.0.25-eval-linux_aarch32sf/bin/java
chip@chip:~/zulu$ ls -l /home/chip/zulu/ezdk-1.8.0_112-8.19.0.25-eval-linux_aarch32sf/bin
total 304
…
-rwxr-xr-x 1 chip chip 3512 Nov 16 13:43 java
…
What’s the output of
sudo update-alternatives --config java
?Quick FYI, there’s no longer a need to register for Zulu Embedded downloads — just go here: http://www.azul.com/downloads/zulu-embedded/
No forms, no fuss, you can get started immediately, then reach out to Azul if you are looking for a specific build or support
[…] Installing the Zulu open source Java Virtual Machine on Raspberry Pi […]