包管理 – default-jdk,ecj,gcj和openjdk有什么区别?

今天早上,我尝试安装一些东西并遇到如下声明:

The program 'javac' can be found in the following packages:
 * default-jdk
 * ecj
 * gcj-4.6-jdk
 * gcj-4.7-jdk
 * openjdk-7-jdk
 * openjdk-6-jdk
Try: sudo apt-get install <selected package>

default-jdk,ecj,gcj和openjdk有什么区别?

提前致谢.

解决方法:

默认的JRE

这是一个简单的包,它依赖于openjdk-7-jre(因此基本上等同于openjdk-7-jre)和default-jre-headless.它安装了“标准Java或Java兼容的运行时”,即OpenJDK 7 JRE.

This package points to the Java runtime, or Java compatible runtime recommended for the i386 architecture, which is openjdk-7-jre for i386.

Package information
   Package dependencies (saucy)

欧洲法院

这是“独立的Eclipse Java编译器”.安装它不会安装Eclipse,因为它是一个独立的包(请参阅下面的依赖项链接).它包含“作为Eclipse的一部分分发的Eclipse JDT编译器的独立版本”,并且与Java 1.3到1.7兼容.

This package provides a standalone version of the Eclipse JDT compiler which is distributed as part of Eclipse. It passes the JCK (Java Compatibility Kit) and is compatible with Java 1.3, 1.4, 1.5, 1.6 and 1.7.

Package information
   Package dependencies (saucy)

GCJ-4.6-JDK

(gcj-4.7-jdk与Java 7相同)

这是GCC编译器本地编译Java字节码和源文件的前端.

GCJ is a front end to the GCC compiler which can natively compile both Java(tm) source and bytecode files. The compiler can also generate class files. Other java development tools from classpath are included in this package.

The package contains as well a collection of wrapper scripts and symlinks. It is meant to provide a Java-SDK-like interface to the GCJ tool set.

它本来是闭源Oracle Java编译器的开源替代品.它现在似乎主要是过时和过时(未更新),请参阅下面的链接(特别是GCJ主页上的最新更新).

Package information

Is GNU’s Java Compiler (GCJ) dead? – Stack Overflow
GCJ home page on gnu.org(更新:链接已经消失,但是GCJ wiki is still available

的openjdk -6- JDK

(openjdk-7-jdk是相同的,但对于Java 7)

Java平台的开源版本.
Wiki开始:

The primary goal of the OpenJDK project is to produce an open-source implementation of the Java SE Platform (6 and 7). This is the default version of Java that Ubuntu uses and is the easiest to install.

套餐摘要:

OpenJDK is a development environment for building applications,
applets, and components using the Java programming language.

The packages are built using the IcedTea build support and patches
from the IcedTea project.

Package information

另外,你的问题中没有提到Oracle Java(因为它不在默认的repos中),我将在下面列出完整性

甲骨文java7的安装程序

(软件包名称自Web Up8 PPA,由Oracle在.tar.gz中分发)

Oracle的封闭源“官方”Java实现(以前是Sun).由于许可问题,未在官方回购中托管.它由Web Up8提供,作为下载并安装它的脚本.

How to install – Web Up8

上一篇:java – 17.10 openjdk和oracle jdk 8和9的trustAnchors参数必须是非空的


下一篇:Ubuntu下快速安装JDK并设置JAVA_HOME