简体   繁体   English

当我安装Java 8时,如何得到版本6的Java错误?

[英]How am I getting this Java error for version 6 when I am installing Java 8?

I am trying to install a version of Java of which I know there is no support, but some application complains that it needs Java 6. I wasn't able to install 6, so I tried with Java 8. My system is running Ubuntu 14.04. 我正在尝试安装一个我不知道它不支持的Java版本,但是某些应用程序抱怨它需要Java6。我无法安装6,所以我尝试使用Java8。我的系统正在运行Ubuntu 14.04。 。

I issued these commands 我发布了这些命令

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

I got this error for Java 6. I removed the folders in /usr/lib/jvm , but I'm still getting this error. 我在Java 6中遇到此错误。我删除了/usr/lib/jvm的文件夹,但仍然出现此错误。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
oracle-java8-installer is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up oracle-java6-installer (6u45-0~webupd8~8) ...
Downloading Oracle Java 6...
--2017-07-15 15:33:19--  http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin
Resolving download.oracle.com (download.oracle.com)... 123.176.33.9, 123.176.33.24
Connecting to download.oracle.com (download.oracle.com)|123.176.33.9|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin [following]
--2017-07-15 15:33:19--  https://edelivery.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin
Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.81.23.175, 2600:140f:9:193::2d3e, 2600:140f:9:18c::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.81.23.175|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin?AuthParam=1500113119_9e1f905b16af4c6074312044fd9dce8e [following]
--2017-07-15 15:33:19--  http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin?AuthParam=1500113119_9e1f905b16af4c6074312044fd9dce8e
Connecting to download.oracle.com (download.oracle.com)|123.176.33.9|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-07-15 15:33:21 ERROR 404: Not Found.

download failed
Oracle JDK 6 is NOT installed.
dpkg: error processing package oracle-java6-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java6-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

Are there any good alternatives for Java 6 on Ubuntu? 在Ubuntu上有Java 6的良好替代品吗? Why does the error show things about Java 6 when I am not installing it? 为什么不安装Java 6时错误会显示有关Java 6的信息?

Did you try installing JDK 6 and 7 before 8 like so: 您是否尝试过在8之前安装JDK 6和7,如下所示:

sudo apt-get install oracle-java6-installer
sudo apt-get install oracle-java7-installer

You could use the Zulu JDK from Azul. 您可以使用Azul的Zulu JDK。 This is a TCK certified build of OpenJDK and completely free. 这是OpenJDK的TCK认证版本,并且完全免费。

Instructions for installation from the repo can be found here: 您可以在以下位置找到从仓库安装的说明:

http://zulu.org/zuludocs-folder/Content/ZuluInstallationGuide/InstallingZulu/InstallOnLinuxUsingAPTRepository.htm http://zulu.org/zuludocs-folder/Content/ZuluInstallationGuide/InstallingZulu/InstallOnLinuxUsingAPTRepository.htm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在z / OS OMVS中安装JAVA 7.1版本后,出现以下错误 - After Installing JAVA 7.1 version in z/OS OMVS I am getting below error 运行以下Java代码时出现此错误 - I am getting this error when I run the below java code 在Android / Java中循环JSONArray时出现类型错误 - I am getting a type error when looping JSONArray in Android / Java 将Java十六进制转换为十进制时出现错误 - I am getting an error when converting Java hexadecimal to decimal 将对象添加到ArrayList时为什么出现此错误-Java - Why am I getting this error when adding object to ArrayList - Java 为什么在 JAVA 中使用扫描仪时出现运行时错误 - Why I am getting a RUNTIME ERROR when using Scanner in JAVA 为什么我在Java中收到Undefinedlabel错误? - why i am getting Undefinedlabel error in java? 当我将 Java 版本升级到 openJDK 11 时,加载模型映射器配置时出现 nullpointerException - When i upgraded java version to openJDK 11, I am getting nullpointerException while loading modelmapper configurations 当我尝试运行 mvn dependency:tree 时,我得到: java.lang.NoClassDefFoundError: org/sonatype/aether/version/VersionConstraint - When I am trying to run mvn dependency:tree , I am getting : java.lang.NoClassDefFoundError: org/sonatype/aether/version/VersionConstraint 我在运行 ant build 时收到 '**** WRONG JAVA VERSION ****' - I am getting '**** WRONG JAVA VERSION ****' on running ant build
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM