当我把fedora换成debian时,我才发现,连J2SDK也不能安。请问:
时间:2005-04-11
来源:互联网
还有,我刚刚换成DEBIAN。但我想知道,这个源列表怎么能保持最新?
如何安J2SDK?谢谢。
作者: jiahaolin 发布时间: 2005-04-11
作者: xqkz 发布时间: 2005-04-11
作者: jiahaolin 发布时间: 2005-04-11
作者: qazwer 发布时间: 2005-04-11
作者: Hewllet 发布时间: 2005-04-11
Last changed on May 11, 2004 by Danny Robert
The following document should lead you by the hand and help you install Java on your box. The reason this isn't a script is because the Java installer seems to change every version, and it doing it by hand is a stepping stone to installing alternative JVMs. So hopefully you get a working install and learn a little about Debian and Java while doing it.
Grab the Java SDK
Sun Java J2SE SDK (1.4.2_04) You want the SDK and Documentation
Installation
Note: Substitute correct version numbers for packages and files when installing future versions.
Upgrade Debian to the latest packages
apt-get update
apt-get -u upgrade
apt-get -u dist-upgrade
Install Debian packages for handling unpackaged software.
apt-get update
apt-get install kaffe equivs java-common java2-common
Install Java SDK
1. Download J2SE SDK components to
/var/install/java/1.4.2
2. Change to install dir:
cd /var/install/java/1.4.2
3. Make sure you have write permissions to the directory.
4. Make installer executable:
chmod a+x j2sdk-1.4.2_04-linux-i586.bin
5. su to root:
sudo su
6. Run the installer:
./j2sdk-1.4.2_04-linux-i586.bin
This will create the directory j2sdk1.4.2_04 with many files and directories in it.
7. Unzip the docs (you did download the docs from the Java website didn't you?):
unzip j2sdk-1.4.2-doc.zip
This will create the directory docs.
8. Move the docs into the SDK:
mv docs j2sdk1.4.2_04
9. su to root:
sudo su
10. Change the ownership of the java files:
chown -R root:src j2sdk1.4.2_04
Note: root should own all system files like java. The group src is short for source as in code. That's the group we are using for users allowed to compile source code.
11. Move the SDK directory tree to the final runtime location:
mv j2sdk1.4.2_04/ /usr/local/lib/
12. Create link:
ln -s /usr/local/lib/j2sdk1.4.2_04 /usr/local/lib/jdk
Note: This link should be used everywhere to refer to the path of the JDK and JRE. Always use /usr/local/lib/jdk… and do not use /usr/local/lib/j2sdk1.4.2_04. This allows easier upgrading in the future and multiple versions of java to be installed simultaneously.
13. Tell Debian that java has been installed. Use the "dummy" package control files provided by java-common to satisfy Debian packing dependencies. NOTE: if you are OSUOSL 'apt-get install java2-compiler-dummy java-compiler-dummy java2-runtime-dummy java-virtual-machine-dummy' and skip to 15.
cd /var/install/java
mkdir pkg
cd pkg
cp /usr/share/doc/java-common/dummy-packages/*.control /var/install/java/pkg/
equivs-build java-compiler-dummy.control
equivs-build java-virtual-machine-dummy.control
equivs-build java2-runtime-dummy.control
equivs-build java2-compiler-dummy.control
14. You should now have 5 packages in /var/install/java/pkg. Install them with dpkg:
dpkg -i java-compiler-dummy_1.0_all.deb java-virtual-machine-dummy_1.0_all.\
deb java2-compiler-dummy_1.0_all.deb java2-runtime-dummy_1.0_all.deb
15. Tell Debian to use our new JDK: Run this shell script * NOTE: The command update-alternatives is used in Debian to choose which of several packages to use when several can do the same thing. ("Java" can be provided by kaffe, blackdown, and Sun, etc.) See "man update-alternatives" for details.*
16. Run java once as root (you're still root) to allow system preference directories to be created and check that Sun's java is running: java -version
17. Update the JAVA_HOME environment variable and the path in /etc/profile or /home/$USER/.bash_profile or /root/.profile:
export JAVA_HOME="/usr/local/lib/jdk"
export JDK_HOME="${JAVA_HOME}"
export PATH="${JAVA_HOME}/bin:${PATH}"
18. To totally reset the environment variables, you need to reboot
NOTE: Leave the directory /var/install/java and its contents. You may need it again later for uninstallation
Mozilla-Firefox Configuration
Run the following command as root:
ln -s /usr/local/lib/jdk/jre/plugin/i386/ns610-gcc32/libjavaplugin_oji.so \
/usr/lib/mozilla-firefox/plugins/libjavaplugin_oji.so
Mozilla Configuration
Run the following command as root:
ln -s /usr/local/lib/jdk/jre/plugin/i386/ns610-gcc32/libjavaplugin_oji.so \
/usr/lib/mozilla/plugins/libjavaplugin_oji.so
Getting Eclipse
apt-get install eclipse-sdk eclipse-source
第十五步有一个脚本,见附件,tar解压。
java.tar.gz (821 字节, 9 次查看) |
作者: xqkz 发布时间: 2005-04-11
在Debian发行版有几个关于Java在Debian上安装的贴子。你可以看一看。
作者: xqkz 发布时间: 2005-04-11
作者: jiahaolin 发布时间: 2005-04-11
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28