I. JDK version: JDK5JDK6. Taking JDK5 as an example, enter javac ON THE Ubuntu7.10 terminal to view the prompt content. Then use the command: sudoapt-getinstallsun-java5-jdk installation process will appear in the dialog box, tab to enter, select yes-& gt; press enter, the installation is complete! ### Default JDK installation path:/us
The following describes how to develop and install software in Ubuntu7.10:
I. JDK
Version: JDK5 JDK6
Taking JDK 5 as an Example
On the Ubuntu7.10 terminal, enter javac to view the prompt content. Run the following command:
Sudo apt-get install sun-java5-jdk
A dialog box is displayed during installation. Click "yes" and press Enter. The installation is complete! ### Default JDK installation path:/usr/lib/jvm
Then configure the environment variables.
Configure environment variables:
You need to edit two files:. bashrc (for hidden files) and/etc/profile under the desktop.
Sudo gedit. bashrc Add the following code:
(The default directory of the terminal is desktop, so no path is needed)
JDK_HOME =/usr/lib/jvm/java-1.5.0-sun-1.5.0.13
Export JDK_HOME
JAVA_HOME =/usr/lib/jvm/java-1.5.0-sun-1.5.0.13
Export JAVA_HOME
Export path = $ JAVA_HOME/bin: $ path
Export IDEA_JDK =/usr/lib/jvm/java-1.5.0-sun-1.5.0.13
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ ###. Bashrc
Add the following code to sudo gedit/etc/profile:
JAVA_HOME =/usr/lib/jvm/java-1.5.0-sun-1.5.0.13
CLASSPATH =.: $ JAVA_HOME/lib/tools. jar:/lib. dt. jar
PATH = $ JAVA_HOME/bin: $ PATH
Export JAVA_HOME CLASSPATH PATH
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ ###/Etc/profile