Solve the font anti-sawtooth problem of Netbeans under Ubuntu8.04

Source: Internet
Author: User
Tags netbeans
First of all, I had been tortured by the jagged Netbeans for half a year before I made up my mind to solve this problem. My Linux release version is Ubuntu8.04. If JDK in the source is easy to use (the current version in the source is 1.6u6), JDK 6 starts to support anti-aliasing. After Netbeans is installed, you will be pleasantly surprised to find that the text on the GUI (GTK +) is reversed, but the text in the editor is jagged, the font size is very obvious.

First of all, I had been tortured by the jagged Netbeans for half a year before I made up my mind to solve this problem.

My Linux release version is Ubuntu 8.04. If JDK in the source is easy to use (the current version in the source is 1.6u6), JDK 6 starts to support anti-aliasing. After Netbeans is installed, you will be pleasantly surprised to find that the text on the GUI (GTK +) is reversed, but the text in the editor is jagged, the font size is very obvious. This problem is well solved. In the advanced options, you can smoothly open the font of the editor. I have endured it for half a year ......

However, WTK cannot be started in the Chinese environment under this JDK. This problem can be solved by specifying the WTK startup appearance as the swing appearance. In fact, not only WTK, but all JavaGUI programs cannot be started as the system. This is the first time that a JavaGUI program is generated through the Netbeans wizard, and errors occur when it is run. This is especially hard on people's confidence and enthusiasm, although it can be solved by setting the application's swing appearance, or adding some inexplicable variable settings in the Program (which can be started with the system's appearance), it is still frustrating.

Sun's latest JDK6u10 has finally solved this problem, so we should not use the JDK in the source.

The following describes the manual installation method, which is quite simple. First download the JDK bin package, decompress the package, move the obtained folder to your main folder, and change the name to jdk.

Edit ~ /. Profile, and add

Export JAVA_HOME =/home/username/jdk
Export PATH = $ JAVA_HOME/bin: $ PATH
Export CLASSPATH =.: $ JAVA_HOME/lib/tools. jar

It is worth noting that ,~ /Jdk write this way, although it is also the jdk location. You can also get the output by typing java-version on the console, but the Netbeans installer does not know it ......

After logging on again, you can run the Netbeans Installer. This time I used Netbeans6.5beta. It is very important for me to upgrade proguard to 4.2, so I don't need to manually set it, who asked me to write the program of j2-based. Result: No advanced options are available. beta is beta, and the text in the editor is jagged.

There are two ways to solve this problem:

One is to use anti-sawtooth only for Netbeans, edit/etc/Netbeans. conf in the netbeans installation directory, and add this startup Parameter

-J-Dawt.useSystemAAFontSettings = on

The other is to make all Java programs use anti-sawtooth, that is, in ~ /. Add the following content to the profile.

Export _ JAVA_OPTIONS = '-Dawt. useSystemAAFontSettings = On'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.