在 CentOS 6 x32 中安装 Java EE 6 时遇到问题。
我已经删除了所有以前版本的 Java,并暂时新安装了 jdk1.6.0_34。
所以我的 $PATH 变量变为:
/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/opt/jdk1.6.0_34/bin/
一切似乎运行良好:
[root@localhost opt]# ./java_ee_sdk-6u4-jdk7-linux.sh
但它会出现以下错误:
Extracting the installer archive...
java.util.zip.ZipException: invalid entry size (expected 3807229 but got 66969 bytes)
at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:386)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:156)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:100)
at sun.tools.jar.Main.extractFile(Main.java:934)
at sun.tools.jar.Main.extract(Main.java:850)
at sun.tools.jar.Main.run(Main.java:240)
at sun.tools.jar.Main.main(Main.java:1147)
Extracting the installer runtime...
java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:223)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:154)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:100)
at sun.tools.jar.Main.extractFile(Main.java:934)
at sun.tools.jar.Main.extract(Main.java:850)
at sun.tools.jar.Main.run(Main.java:240)
at sun.tools.jar.Main.main(Main.java:1147)
Extracting the installer resources...
java.io.FileNotFoundException: ./Product/Packages/Resources.zip (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at java.io.FileInputStream.<init>(FileInputStream.java:79)
at sun.tools.jar.Main.run(Main.java:236)
at sun.tools.jar.Main.main(Main.java:1147)
Extracting the installer metadata...
java.io.FileNotFoundException: ./Product/Packages/metadata.zip (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at java.io.FileInputStream.<init>(FileInputStream.java:79)
at sun.tools.jar.Main.run(Main.java:236)
at sun.tools.jar.Main.main(Main.java:1147)
chmod: cannot access `product-installer.sh': No such file or directory
sh: product-installer.sh: No such file or directory
校验和:
[root@localhost opt]# md5sum java_ee_sdk-6u4-jdk7-linux.sh
9299039e3daefff779875721ec8288c3 java_ee_sdk-6u4-jdk7-linux.sh
原因是 WinSCP 存在错误(从我的 Windows PC 转移到 Linux),传输了许多文件并且校验和发生了变化……
更改为 Filezilla 并且校验和匹配。
答案1
我从 Oracle 网站下载了相同的文件,它的 md5sum 是 --
[chida@localhost Downloads]$ md5sum java_ee_sdk-6u4-jdk7-linux.sh
2a79c24baed38f847def9c4e3398b40a java_ee_sdk-6u4-jdk7-linux.sh
我在我的 64 位 Fedora 17 上运行了安装程序脚本,它运行良好并打开了图形安装程序。
请验证校验和是否与我的匹配,否则就是别的。
答案2
我相信 winscp 默认以 ascii 模式传输 .sh 文件,因此出现了您的问题。
答案3
您下载的 Java EE SDK 不完整。