Linux OSBN/Ubuntuusers Planet XING / LinkedIn

Short tip: Java applications and HiDPI

Legacy software is often used longer than planned. Running older Java software on high-resolution displays with more than 1080p is quite hard by default.

To fix this, manually setting scaling via command-line pararameters is sufficient:

$ java -Dsun.java2d.uiScale=3.5 -jar app.jar

In this case, 3.5x or 350% scaling is set. Alternatively you can also set the environment variable GDK_SCALE:

$ GDK_SCALE=3.5 java -jar app.jar

This should make applications human readable again:

100% and 350% scaling

Sharing is caring

Leave a Reply

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