I’m using the following steps to install Zulu Java 11 in Raspbian Stretch/Buster, necessary for Blynk Server
-
Remove openjdk-11
sudo apt remove openjdk-11-jre -
Download zulu11.33.21-ca-jdk11.0.4-linux_aarch32hf.tar.gz (replacing with correct version/name) from https://www.azul.com/downloads/zulu-community/
to ~/Download/Java11-Zulu -
Copy to /usr/lib/jvm
sudo cp ~/Download/Java11-Zulu/zulu11.33.21-ca-jdk11.0.4-linux_aarch32hf.tar.gz /usr/lib/jvm
sudo tar -xzvf zulu11.33.21-ca-jdk11.0.4-linux_aarch32hf.tar.gz -
Modify symbolic link to point to new java-11
Originally, /usr/bin/java -> /etc/alternatives/java -> /usr/lib/jvm/java-11-openjdk-armhf/bin/java
a) sudo rm /etc/alternatives/java
b) sudo ln -s /usr/lib/jvm/zulu11.33.21-ca-jdk11.0.4-linux_aarch32hf/bin/java /etc/alternatives/java
c) Testing
java -version
openjdk version “11.0.4” 2019-07-16 LTS
OpenJDK Runtime Environment Zulu11.33+21-CA (build 11.0.4+10-LTS)
OpenJDK Client VM Zulu11.33+21-CA (build 11.0.4+10-LTS, mixed mode)
- To run Blynk server manually
cd ~/Blynk-Server
sudo bash ./start_server.sh &
- or to run automatically after starting up, modify /etc/rc.local as follows:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
java -jar /home/pi/Blynk-Server/Blynk-Server.jar -dataFolder /home/pi/Blynk-Server/Data &
exit 0