|
I've used another method to install Java an the Java plugins for Firefox. This one is not listed on the Ubuntu Wiki and I can't find it here too.
It seems to be the (new) correct way to install Sun JDK on Ubuntu/Debian.
1) Install java-common and equivs with apt-get.
Code:
sudo apt-get install java-common equivs
2) Follow (with adaptations) instructions in file:///usr/share/doc/java-common/d...ch11.html#s11.3 (installed by java-common). In a Root Terminal (Applications > System Tools > Root Terminal).[进入终端按照下面按下面执行操作]
Code:
# cd /var/install
# mkdir java
# cd java
# wget http://copy.the.correct/url/from/your/browser -O jdk-1_5_0-linux-i586.bin #/这里是下载JDK,可使用其他方式或软件下载后放到此目录就可以里。/#
# chmod +x jdk-1_5_0-linux-i586.bin
# ./jdk-1_5_0-linux-i586.bin
# mv jdk1.5.0 /usr/local/lib
# ln -s /usr/local/lib/jdk1.5.0 /usr/local/lib/jdk
# mkdir pkg
# cd pkg
# cp /usr/share/doc/java-common/dummy-packages/*.control .
# equivs-build java1-runtime-dummy.control
# equivs-build java-compiler-dummy.control
# equivs-build java2-compiler-dummy.control
# equivs-build java2-runtime-dummy.control
# equivs-build java-virtual-machine-dummy.control
# dpkg -i *.deb
# update-alternatives --verbose --install /usr/bin/java java /usr/local/lib/jdk/bin/java 500 --slave /usr/share/man/man1/java.1 java.1 /usr/local/lib/jdk/man/man1/java.1
# ln -s /usr/local/lib/jdk/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/libjavaplugin_oji.so
# java -version
The output of the last command should be something like
Code:
java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
You should now have a full and working Java environment. |
|