Veit's Blog

Hej! đź‘‹ Welcome to my curated space of insights on software development and the tapestry of life.

Remote debugging Tomcat applications on Raspberry Pi with IntelliJ

2016-01-01

I assume that you’ve installed Java 1.7 or higher on your Pi. If not here’s a short recap:

  • Download the “Linux ARM v6/v7 Hard Float ABI” image from Oracle.
  • Extract image to “/opt” directory sudo tar zxvf <jdk-8-linux-arm-image.tar.gz> -C /opt
  • Activate Java and the Java compiler
update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_65/bin/javac 1
update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_0_65/bin/java 1
update-alternatives --config javac
update-alternatives --config java
  • Check with java --version

Now let’s download Tomcat 8 with wgget http://mirror.synyx.de/apache/tomcat/tomcat-8/v8.0.30/bin/apache-tomcat-8.0.30.tar.gz and extract the archive with tar xvf apache-tomcat-8.0.23.tar.gz. After that start Tomcat and JPDA with ./catalina.sh jpda start. Point your browser to http://<raspberry>:8080 to see if Tomcat has successfully started.

Start Intelli and create a new Tomcat remote run configuration with the following settings:

Now you’re able to debug your applications on the remote Tomcat.