Manjaro Configurer toutes les applications Java pour qu'elles utilisent les polices et les thèmes GTK

Configurer toutes les applications Java pour qu'elles utilisent les polices et les thèmes GTK

From Manjaro
Revision as of 07:36, 22 May 2024 by Dadu042 (talk | contribs) (Created page with "export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:
English • ‎español • ‎français • ‎русский • ‎فارسی


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

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

export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel ${_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/90-java_ops.sh (system-wide). In both cases, if the file does not exist, create it.

{{{2}}}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.