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