Some time ago, I searched for related articles about how to configure the j2ee development environment under Ubuntu on the Internet. Now I have summarized the issue here. First, install sudoapt-get of jre and jdkUbuntu to install java easily: Open the terminal, run the following command or use Adept/new software manager to search for "sun-java6-jre" and "sun-java6-jdk" and tag the installation. Sudoapt-getinstallsun
Some time ago, I searched for articles related to configuring the j2ee development environment under Ubuntu on the Internet. Now, I have concluded that the privilege should be forgotten,
First install sudo apt-get of jre and jdk Ubuntu, which is very convenient.
Install java:
Open the terminal, run the following command, or use Adept/new software manager, where search for "sun-java6-jre" and "sun-java6-jdk" and tag the installation.
Sudo apt-get install sun-java6-jre
If the space is rich, we recommend that you install a 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 and compiler: (skip this step if multiple java virtual machines are not installed in Ubuntu9.10 .)
Sudo update-alternatives -- config java
The following figure is displayed after execution:
There are 2 alternatives which provide 'java '. selection Alternative ------------------------------------------- #/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.
Sudo update-alternatives -- config javac
The operation is similar to the previous one.
Configure JAVA environment variables:
Sudo gedit/etc/environment
Add the following two lines:
JAVA_HOME =/usr/lib/jvm/java-6-sunCLASSPATH =.:/usr/lib/jvm/java-6-sun/lib
To make the configuration take effect, you must restart the machine or enter
./Etc/environment
Configure the JVM priority: (skip this step if multiple Java virtual machines are not installed in Ubuntu9.10 .)
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 (recommended ):
Sudo apt-get install sun-java6-plugin
Chinese font setting: If the font of the text tripod works, but spaces may appear, you can edit it.
/Usr/lib/jvm/java-6-sun/jre/lib/fonts. dir
Add # To comment out all fonts before all Lucida. If you use a Custom font, create a link to/usr/lib/jvm/java-6-sun/jre/lib/fonts/fallback
Install the browser's JAVA Plugin (optional ):
Sudo apt-get install sun-java6-plugin eclipse to install, this download directly to the official website can be decompressed directly use, if you are Ubuntu 9.10 version, you can run the whereis eclipse command to check whether the idemyeclipse plug-in that comes with your machine does not exist today.