Ubuntu 12.04にSun Javaをインストールする

3142 ワード

$ sudo apt-add-repository ppa:flexiondotorg/java
$ sudo apt-get update
$ sudo apt-get install sun-java6-jre sun-java6-jdk sun-java6-plugin

 
sudo apt-get install  libmyodbc odbc-postgresql tdsodbc unixodbc-bin binfmt-support sun-java6-demo default-jdk-doc sun-java6-source sun-java6-fonts ttf-baekmuk

 最近、上の方法に問題があると言われていますが、私も最近やってみましたが、確かに問題があります.
そこで検索すると、あるサイトで答えを探しました.
1.使用可能なJDKを問い合せます.
root@xxxx:/# apt-cache search jdk     
libpg-java - Java database (JDBC) driver for PostgreSQL     
free-java-sdk - Complete Java SDK environment consisting of free Java tools     
icedtea-java7-bin - Java runtime based on OpenJDK     
icedtea-java7-demo - Java runtime based on OpenJDK     
icedtea-java7-doc - Icedtea Development Kit (JDK) documentation     
icedtea-java7-jdk - Java runtime based on OpenJDK     
icedtea-java7-jre - Java runtime based on OpenJDK     
icedtea-java7-plugin - Java plugin based on OpenJDK and gcjwebplugin     
icedtea-java7-source - Icedtea Development Kit (JDK) source files     
japitools - Java API compatibility testing tools     
kaffe - A JVM to run Java bytecode     
libcommons-lang-java - Extension of the java.lang package     
libcommons-launcher-java - cross platform java application launcher     
libicu4j-java - Library for unicode support and internalisation     
libitext-java - Java Library to generate PDF on the Fly     
librxtx-java - Full Java CommAPI implementation     
mmake - Makefile generator for Java programs     
usepackage - utility to manage environment variables from within dotfiles     
jde - JDEE, Java Development Environment for Emacs(en)     
sun-java5-bin - Sun Java(TM) Runtime Environment (JRE) 5.0 (architecture dependent files)     
sun-java5-demo - Sun Java(TM) Development Kit (JDK) 5.0 demos and examples     
sun-java5-doc - Sun JDK(TM) Documention -- integration installer     
sun-java5-jdk - Sun Java(TM) Development Kit (JDK) 5.0     
sun-java5-jre - Sun Java(TM) Runtime Environment (JRE) 5.0 (architecture independent files)     
sun-java5-source - Sun Java(TM) Development Kit (JDK) 5.0 source files     
sun-java6-bin - Sun Java(TM) Runtime Environment (JRE) 6 (architecture dependent files)     
sun-java6-demo - Sun Java(TM) Development Kit (JDK) 6 demos and examples     
sun-java6-doc - Sun JDK(TM) Documention -- integration installer     
sun-java6-javadb - Java(TM) DB, Sun Microsystems' distribution of Apache Derby     
sun-java6-jdk - Sun Java(TM) Development Kit (JDK) 6     
sun-java6-jre - Sun Java(TM) Runtime Environment (JRE) 6 (architecture independent files)     
sun-java6-source - Sun Java(TM) Development Kit (JDK) 6 source files     
libc6-i686 - GNU C Library: Shared libraries [i686 optimized]  
 
2.sun-java 6-jdkのインストールを選択
apt-get install sun-java6-jdk

3.書類は全部どこに入れましたか.
検索すると、ファイルは:/usr/lib/jvm/java-6-sun-1.6.003にインストールされています.
/usr/lib/jvm/java-6-sunは/usr/lib/jvm/java-6-sun-1.6.0.03のシンボルリンクです.
4.JAVA_の設定HOME変数
/etc/profileファイルの編集