How do you enable anti aliasing in arbitrary Java apps?

If you have access to the source, you can do this in the main method:

  // enable anti-aliased text:
  System.setProperty("awt.useSystemAAFontSettings","on");

or, (and if you do not have access to the source, or if this is easier) you can simply pass the system properties above into the jvm by adding these options to the command line:

-Dawt.useSystemAAFontSettings=on

Leave a Comment