将 Java 6 从 Oracle 安装到 Debian Lenny

将 Java 6 从 Oracle 安装到 Debian Lenny

由于 Java 6 在 Debian 5 中不可用,我决定从 Oracle 获取它。我已经在 jdk-6u45-linux-i586-rpm.bin 文件中下载了 Java 6 SDK。但如何安装呢?

我执行jdk-6u45-linux-i586-rpm.bin并得到了几个文件:

jdk-6u45-linux-i586.rpm                
sun-javadb-core-10.6.2-1.1.i386.rpm
sun-javadb-demo-10.6.2-1.1.i386.rpm
sun-javadb-docs-10.6.2-1.1.i386.rpm
sun-javadb-javadoc-10.6.2-1.1.i386.rpm
sun-javadb-client-10.6.2-1.1.i386.rpm

接下来我应该做什么?

UPD

执行后:

rpm -ivh jdk-6u45-linux-i586.rpm sun-javadb-core-10.6.2-1.1.i386.rpm sun-javadb-demo-10.6.2-1.1.i386.rpm sun-javadb-docs-10.6.2-1.1.i386.rpm sun-javadb-javadoc-10.6.2-1.1.i386.rpm sun-javadb-client-10.6.2-1.1.i386.rpm

得到输出:

/bin/basename is needed by jdk-1.6.0_45-fcs.i586
/bin/cat is needed by jdk-1.6.0_45-fcs.i586
/bin/cp is needed by jdk-1.6.0_45-fcs.i586
/bin/gawk is needed by jdk-1.6.0_45-fcs.i586
/bin/grep is needed by jdk-1.6.0_45-fcs.i586
/bin/ln is needed by jdk-1.6.0_45-fcs.i586
/bin/ls is needed by jdk-1.6.0_45-fcs.i586
/bin/mkdir is needed by jdk-1.6.0_45-fcs.i586
/bin/mv is needed by jdk-1.6.0_45-fcs.i586
/bin/pwd is needed by jdk-1.6.0_45-fcs.i586
/bin/rm is needed by jdk-1.6.0_45-fcs.i586
/bin/sed is needed by jdk-1.6.0_45-fcs.i586
/bin/sort is needed by jdk-1.6.0_45-fcs.i586
/bin/touch is needed by jdk-1.6.0_45-fcs.i586
/usr/bin/cut is needed by jdk-1.6.0_45-fcs.i586
/usr/bin/dirname is needed by jdk-1.6.0_45-fcs.i586
/usr/bin/expr is needed by jdk-1.6.0_45-fcs.i586
/usr/bin/find is needed by jdk-1.6.0_45-fcs.i586
/usr/bin/tail is needed by jdk-1.6.0_45-fcs.i586
/usr/bin/tr is needed by jdk-1.6.0_45-fcs.i586
/usr/bin/wc is needed by jdk-1.6.0_45-fcs.i586
/bin/sh is needed by jdk-1.6.0_45-fcs.i586
sun-javadb-common is needed by sun-javadb-core-10.6.2-1.1.i386
/bin/sh is needed by sun-javadb-core-10.6.2-1.1.i386
sun-javadb-common is needed by sun-javadb-demo-10.6.2-1.1.i386
sun-javadb-common is needed by sun-javadb-docs-10.6.2-1.1.i386
sun-javadb-common is needed by sun-javadb-javadoc-10.6.2-1.1.i386
sun-javadb-common is needed by sun-javadb-client-10.6.2-1.1.i386

答案1

安装 Oracle 的 Java 6 JDK 的最佳方法是按以下步骤操作:

  • 安装java-package

    apt-get install java-package
    
  • 下载jdk-6u45-linux-i586.bin不是转速)从甲骨文的成就;

  • 创建对应的Debian包:

    make-jpkg jdk-6u45-linux-i586.bin
    
  • 安装生成的包:

    sudo dpkg -i oracle-java6-jdk_6u45_i386.deb
    

这将负责设置替代方案等,以便您可以完全替换任何已安装的 JVM。如果要保留安装的多个 JVM,请使用update-java-alternatives选择默认 JVM。

答案2

您必须安装 rpm:

rpm -ivh jdk-6u45-linux-i586.rpm sun-javadb-core-10.6.2-1.1.i386.rpm sun-javadb-demo-10.6.2-1.1.i386.rpm sun-javadb-docs-10.6.2-1.1.i386.rpm sun-javadb-javadoc-10.6.2-1.1.i386.rpm sun-javadb-client-10.6.2-1.1.i386.rpm

应该足够了,如果你不打算做开发,我会留下演示javadb-demo-10.6.2-1.1.i386.rpm和两个文档包sun-javadb-docs-10.6.2-1.1.i386.rpm sun-javadb-javadoc-10.6.2-1.1.i386.rpm

相关内容