Manjaro Difference between revisions of "Set all Java apps to use GTK+ font & theme settings/fa"

Difference between revisions of "Set all Java apps to use GTK+ font & theme settings/fa"

From Manjaro
(Created page with "متغیر '''_JAVA_OPTIONS''' را با دستور زیر در پایانه، تنظیم کنید:")
Tags: Mobile web edit Mobile edit
Tags: Mobile web edit Mobile edit
Line 12: Line 12:


{{SectionTemplate|چگونه انجامش می‌دهیم؟|2=
{{SectionTemplate|چگونه انجامش می‌دهیم؟|2=
متغیر '''_JAVA_OPTIONS''' را با دستور زیر در پایانه، تنظیم کنید:
متغیر '''JAVA_OPTIONS_''' را با دستور زیر در پایانه، تنظیم کنید:


  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}"
  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}"

Revision as of 06:27, 13 February 2022

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

چگونه انجامش می‌دهیم؟

متغیر JAVA_OPTIONS_ را با دستور زیر در پایانه، تنظیم کنید:
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.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.