Set all Java apps to use GTK+ font & theme settings

From Manjaro
Jump to navigation Jump to search
Other languages:


This fix makes your Java apps use your GTK+ theme (colours & such) & your chosen font settings. Here is how it looks like:

Before the fix

How do you do it?

Set the variable _JAVA_OPTIONS by running this command in a terminal:

export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true ${_JAVA_OPTIONS}"

First test to see if the outcome is what you expect by running your Java app from the same terminal window.

If the result looks good to you, let us make the changes permanent:

Append the above definition of the _JAVA_OPTIONS variable to ~/.profile (for your user only) or /etc/profile.d/ (system-wide). In both cases, if the file does not exist, create it.