Debian 7 Java JDKをインストールする
2915 ワード
http://www.redirecttonull.com/?p=250を参照してください
原文は以下の通りです
Install Java SE 7 SDK on Debian Wheezy
Febrary 19,2012
Debian ships with OpenJDK by default,but the Sun(now Oracle)Java SDK could be optionly installed using the package
I really like OpenJDK,but there re several reasons to install the Oracle tools.Clints will tents to use Oracle Java,so that is what I need to test.I also need to test acros a nber of sivere 1.6
I have put together this gide which describes all of the stages to success fully install Oracle Java SE SDK on Debian Wheezy.This gide asums 64-bit Java 7,but it shoud work for 32-bit and earlier the.the。
Download
First you need to download the latest Java SE SDK version.Go to the following link and download the file
Onese the download has completted extract it into the
Test
To see which version of Java you are now running by default、execute the follwing command from a terminal:
原文は以下の通りです
Install Java SE 7 SDK on Debian Wheezy
Febrary 19,2012
Debian ships with OpenJDK by default,but the Sun(now Oracle)Java SDK could be optionly installed using the package
sun-java6-jdk
.However,Debian have recently removed Oracle Java from their testing(Wheezy)repositories as a repositorit of a new redistriction license(see) here)、and so it is not possible to install Oracle Java SDK without a little more work.I really like OpenJDK,but there re several reasons to install the Oracle tools.Clints will tents to use Oracle Java,so that is what I need to test.I also need to test acros a nber of sivere 1.6
I have put together this gide which describes all of the stages to success fully install Oracle Java SE SDK on Debian Wheezy.This gide asums 64-bit Java 7,but it shoud work for 32-bit and earlier the.the。
Download
First you need to download the latest Java SE SDK version.Go to the following link and download the file
jdk-7u3-linux-x64.tar.gz
(there maybe a later udate available when you do this)http://www.oracle.com/technetwork/java/javase/downloads/index.html
InstallOnese the download has completted extract it into the
/opt
directory.To do this open a new root terminal and run the followwing command:
# cd /opt
# tar -xzvf <path_to_download>/jdk-7u3-linux-x64.tar.gz
Debian already has a pattern for mangdifferent software version s on.This step gister s the downloveratva,142Test
To see which version of Java you are now running by default、execute the follwing command from a terminal:
# update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_03/bin/java 1
# update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_03/bin/javac 1
# update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_03/jre/lib/amd64/libnpjp2.so 1
# update-alternatives --set java /opt/jdk1.7.0_03/bin/java
# update-alternatives --set javac /opt/jdk1.7.0_03/bin/javac
# update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_03/jre/lib/amd64/libnpjp2.so
To check the browse to
# java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
and click「Do I have Java?」.If everthing is installed corectly then You shuld see the follwing message: