Install JAVA environment support in Ubuntu8.04

Source: Internet
Author: User
Ubuntu8.04 official version will be released tomorrow! The following Linux community for everyone to explain in Ubuntu8.04 how to install JAVA environment support, open the terminal, enter the following command: sudoapt-getinstallsun-java6-jre if your disk space is relatively idle, it is recommended to install JDK: sudoapt-getinstallsun-java6-jdk tips: during the installation process, you need to answer whether you agree to use the Protocol (red and blue in the terminal ).

Ubuntu8.04 official version will be released tomorrow! The Linux community below explains how to install JAVA environment support in Ubuntu8.04, open the terminal, and enter the following command:

Sudo apt-get install sun-java6-jre

If your disk space is relatively idle, we recommend that you install JDK:

Sudo apt-get install sun-java6-jdk

Tip: During the installation process, you need to answer whether you agree to use the Protocol (the red-blue prompt page in the terminal). Press the tab key to OK, and press enter to install it normally. ()

Set the current default java interpreter:

Sudo update-alternatives -- config java

The following figure is displayed after execution:

There are 2 alternatives which provide 'java '.

Selection Alternative

-----------------------------------------------

1/usr/bin/gij-wrapper-4.1

* + 2/usr/lib/jvm/java-6-sun/jre/bin/java

Press enter to keep the default [*], or type selection number:

Enter the number before the row containing "sun. As shown above, enter 2 and press enter to confirm.

Configure JAVA environment variables:

Sudo gedit/etc/environment

Add the following two lines:

CLASSPATH =.:/usr/lib/jvm/java-6-sun/lib

JAVA_HOME =/usr/lib/jvm/java-6-sun

Sudo gedit/etc/jvm

Convert

/Usr/lib/jvm/java-6-sun

Enter this line at the top of the configuration block.

Install the browser's JAVA Plugin (optional ):

Sudo apt-get install sun-java6-plugin

Java Chinese support (or garbled solutions): java programs are cross-platform, but Chinese support needs to be addressed.

The method is very simple, that is, place a Chinese font in the java installation directory.

Cd/usr/lib/jvm/java-6-sun/jre/lib/fonts

Sudo mkdir fallback

Cd fallback

Sudo ln-s ~ /. Fonts/firefly. ttf (I selected the latest wenquanyi Kuafu font,/usr/share/fonts/wenquanyi/wqy-zenhei/wqy-zenhei.ttf)

Sudo mkfontdir

Sudo mkfontscale

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.