I don’t know which installation step you did not do correctly, but from the symptom:
root@raspberrypi:/home/pi# java --version
Ungültiger Maschinenbefehl => Invalid machine command
I bet your RPi didn’t know where the java command is, therefore, your Blynk server couldn’t start.
You can find out if your openjdk java was installed (normally /usr/bin/
) by using this command to test
pi@raspberrypi-02:~ $ /usr/bin/java --version
openjdk 11.0.5 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10-post-Raspbian-1deb10u1)
OpenJDK Server VM (build 11.0.5+10-post-Raspbian-1deb10u1, mixed mode)
pi@raspberrypi-02:~ $
if this is not working, you can find out if and where java was installed by using this command:
pi@raspberrypi-02:~ $ sudo find / -name java -print
...
...
/usr/share/java
/usr/bin/java <= this is where java normally installed
...
For example, you find out java was installed in /usr/bin/java, you have some options such as:
- Using
/usr/bin/java
instead of onlyjava
whenever you run it
pi@raspberrypi-02:~ $ /usr/bin/java --version
openjdk 11.0.5 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10-post-Raspbian-1deb10u1)
OpenJDK Server VM (build 11.0.5+10-post-Raspbian-1deb10u1, mixed mode)
pi@raspberrypi-02:~ $ /usr/bin/java -jar server-0.41.11.jar -dataFolder /home/pi/blynk log &
- Update your PATH to java
One note is that you’d better not use root
account in everyday job. One small mistake can destroy your system. Use pi
or whatever account you create but root
. Whenever you need root
privilege, use sudo
. Also change the default root
and pi
password.
pi@raspberrypi-02:~ $ sudo passwd root
pi@raspberrypi-02:~ $ passwd
Good luck.