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

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

From Manjaro
(Created page with "{{FlexSideContainerTemplate| thumb|none|400px|До исправления | File:Java_GTK_look.png|thumb|none|400px|После исправл...")
Tags: Mobile web edit Mobile edit
(Created page with "Установите переменную '''_JAVA_OPTIONS''', выполнив эту команду в терминале:")
Tags: Mobile web edit Mobile edit
Line 12: Line 12:


{{SectionTemplate|Как это сделать?|2=
{{SectionTemplate|Как это сделать?|2=
Set the variable '''_JAVA_OPTIONS''' by running this command in a terminal:
Установите переменную '''_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:47, 24 January 2023

Other languages:
English • ‎español • ‎français • ‎русский • ‎فارسی

Введение

Это исправление заставляет ваши Java-приложения использовать тему GTK+ (цвета и т.п.) и выбранные настройки шрифтов. Вот как это выглядит:


До исправления

Как это сделать?

Установите переменную _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.