Notes on java and Netbeans in Ubuntu

Source: Internet
Author: User
Tags netbeans
Precautions for java and Netbeans in Ubuntu-general Linux technology-Linux programming and kernel information. For details, refer to the following section. When we first use Ubuntu for java program development (Netbeans), you may encounter some basic problems. I will summarize them here for your reference.

1. Solve Chinese garbled characters in java programs

By default, if you install the Chinese version of netbeans in linux, you will see a lot of small boxes. Copy a Chinese font that can be displayed online or in Windows, such as simsun. ttf, and copy it to javahome/jre/lib/fonts/fallback. Then open the software such as netbeans that uses the same java environment, and there will be no more interface square problems.

2. Netbeans5.5 enterprise pack Installation

I tested it in Ubuntu6.10 and 7.04. The graph installation interface of Netbeans5.5 enterprise pack cannot be run in JDK1.6. Therefore, it is best to switch back to jdk1.5 during installation.

3. Change the default JDK version.

Go to the/etc/alternatives directory and run the following command:
Rm java
Ln-s/usr/lib/j2sdk1.5-sun/bin/java. Among them, "/usr/lib/j2sdk1.5-sun/bin/java" is the path of the java program in the jdk you want.

In addition, you can use the following method to update and change jdk:
Obtain Sun JDK 6:
Sudo apt-get install sun-java6-jdk
View the list of installed jdk:
Update-java-alternatives-l
Set the default Java:
Sudo update-java-alternatives-s java-1.6.0-sun
Related Article

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.