How To use the Java under Linux ?let's study.
First step : you need the jdk  packet .where download?as following URL:

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

and  i down the jdk-7u17-linux-i586.tar.gz

second step: change one directory ,(as /home/(my system name)/java/jdk)uncompress the packet ,order :


点击(此处)折叠或打开

  1. tar zxvf jdk-7u17-linux-i586.tar.gz



then ,you will see a dirctory:jdk1.7.0_17
install and configure the  jdk on Ubuntu @JAVA-LMLPHP

Third step : configure the environment.Order:


点击(此处)折叠或打开

  1. cd ~
  2. gedit .bashrc



and write the code as follows:

点击(此处)折叠或打开

  1. #JAVA runtime environment
  2. export JAVA_HOME=/home/ubuntu/java/jdk/jdk1.7.0_17
  3. export PATH=$JAVA_HOME/bin:$PATH
ok ,save,

then ,you can call the console ,input;

点击(此处)折叠或打开

  1. java

  2. javac

  3. jar

  4. ....

to test.it's proof thar you are right if you see the result as follows.
install and configure the  jdk on Ubuntu @JAVA-LMLPHP




11-25 02:21