Setting up Java Development on Raspberry Pi

The idea of using the Pi as a machine for java development really excited me. With 8GB ram and quad core arm 64 bit processor and Manjaro Mate as the operating system, it was more than capable of running necessary apps for Java development. I was willing to see how far I can go with this. At minimum I was looking at installing JDK 11, maven, an IDE like IntelliJ and try to run some sample code.

I turned to the trusted sdkman. Installing sdkman was a breeze and few quick commands helped me install java and maven as well.

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java 11.0.16-zulu
sdk install mvn 3.8.6

Time to check if everything is installed correctly

[koolksp@koolksp-rpi ~]$ java -version
openjdk version "11.0.16" 2022-07-19 LTS
OpenJDK Runtime Environment Zulu11.58+15-CA (build 11.0.16+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.58+15-CA (build 11.0.16+8-LTS, mixed mode)
[koolksp@koolksp-rpi ~]$ mvn -version
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /home/koolksp/.sdkman/candidates/maven/current
Java version: 11.0.16, vendor: Azul Systems, Inc., runtime: /home/koolksp/.sdkman/candidates/java/11.0.16-zulu
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.15.56-1-manjaro-arm-rpi", arch: "aarch64", family: "unix"
[koolksp@koolksp-rpi ~]$

For the IDE, IntelliJ IDEA version for linux is a downloadable .tar.gz file. Simply extracting it and running the idea.sh script brings up the IDE. I had to tweak a few system variables and set the PATH for things to work. But once done I had no issue starting the IDE. I quickly created a maven project, added some sample code and went ahead with maven build to create a jar file. Running the code within IntelliJ shows output as expected. Of course it is not blazing fast. Pi does have its limitations, but the fact that it can indeed do all this is a feat. The small single board computer does pack a punch. It will be fun to have some small project developed and tested on the Pi. I plan to extend my dev setup to include spring boot and maybe a tomcat server, just to see how far I can push this tiny beast.

Leave a comment