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

Marked this version for translation
(Updated style and added translate tags)
(Marked this version for translation)
Line 2: Line 2:
__TOC__
__TOC__


{{SectionTemplate|<translate>Introduction</translate>|2=
{{SectionTemplate|<translate><!--T:1--> Introduction</translate>|2=
This fix makes your Java apps use your GTK+ theme (colours & such) & your chosen font settings. Here is how it looks like:
This fix makes your Java apps use your GTK+ theme (colours & such) & your chosen font settings. Here is how it looks like:


Line 11: Line 11:
|1|1}}}}
|1|1}}}}


{{SectionTemplate|<translate>How do you do it?</translate>|2=
{{SectionTemplate|<translate><!--T:2--> How do you do it?</translate>|2=
<translate>
<translate>
<!--T:3-->
Set the variable '''_JAVA_OPTIONS''' by running this command in a terminal:
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}"
  <!--T:4-->
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}"


<!--T:5-->
First test to see if the outcome is what you expect by running your Java app from the same terminal window.
First test to see if the outcome is what you expect by running your Java app from the same terminal window.


<!--T:6-->
If the result looks good to you, let us make the changes permanent:
If the result looks good to you, let us make the changes permanent:


<!--T:7-->
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.
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.
</translate>
</translate>
}}
}}


{{SectionTemplate|<translate>See Also</translate>|
{{SectionTemplate|<translate><!--T:8--> See Also</translate>|
* [http://askubuntu.com/questions/21886/how-can-i-get-a-java-apps-to-use-the-gtk-theme How can I get a java apps to use the GTK+ theme?(askubuntu)]
* [http://askubuntu.com/questions/21886/how-can-i-get-a-java-apps-to-use-the-gtk-theme How can I get a java apps to use the GTK+ theme?(askubuntu)]
* Related [https://forum.manjaro.org/t/wiki-set-all-java-apps-to-use-gtk-font-theme-settings/19305 forum post]|Chmsee-icon.png}}
* Related [https://forum.manjaro.org/t/wiki-set-all-java-apps-to-use-gtk-font-theme-settings/19305 forum post]|Chmsee-icon.png}}


[[Category:Contents Page{{#translation:}}]]
[[Category:Contents Page{{#translation:}}]]