Categories
Fun IT

Abevjava f*ck on Ubuntu Focal. Docker to the rescue

Recently I’ve upgraded to Ubuntu Focal. All went just fine. However, today, when I wanted to use abevjava (=a java based GUI app to do the monthly honor to the national tax authority) I got a “Listazas folyamatban” (=listing in progress) message and it seemed that this java based crap just froze.

After a few restarts, I figured out that it must be the new Ubuntu version. I tried it with openjdk-11-jre-headless (and even 14). Apparently none of them are supported.

So I figured out that I need Docker to the rescue.

Take the following Dockerfile:

FROM ubuntu:18.04

RUN apt-get update && \
apt-get install -y openjdk-8-jre-headless && \
sed -i -e ‘/^assistive_technologies=/s/^/#/’ /etc/java-*-openjdk/accessibility.properties

The sed line is necessary to fix an AWT issue. Finally run the following command to start abevjava inside a docker container:

docker run -ti –rm \
–name abevjava \
-u $(id -u):$(id -g) \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /home/sj/apps/abevjava:/home/sj/apps/abevjava \
-v /home/sj/.abevjava:/home/sj/.abevjava \
-v /home/sj/abevjava_sj.log:/home/sj/abevjava_sj.log \
-v /etc/passwd:/etc/passwd:ro \
-w /home/sj/apps/abevjava \
abevjava ./abevjava_start

And finally it was working properly, and I file my monthly dues. Thanks, Docker!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.