Calling the package 'default-jdk' is not user friendly
Bug #564699 reported by
hasan adil
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
java-common (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: java-common
The word "default" means different things to different people. Do you mean the default for Sun (I guess Oracle for whom the latest version is not the default in the database) or default for application server people or default you need for android or default for the user (the user's don't really have a default).
"default-jdk" is confusing.
Additionally, there is another package called openjdk-6-jdk. But default-jdk points to openjdk-6-jdk also so which one should a common non-programmer choose?
To post a comment you must log in.
Hi
Most JVMs (including Oracle/Sun's java and openjdk-6) have more than one variant. For instance openjdk-6 ships a server variant (see man java or java -help), which makes the JVM assume that will be run for "long periods of time". It also has a client variant that attempts to reduce start-up time.
So openjdk-6 can be the default for both users and servers. The same applies to sun-java6 since openjdk-6 are based on open source parts of sun-java6.
Now back to the default-jdk package; default-jdk and its sister packages default-jre and default- jre-headless are "meta packages". Long story short, these packages depend on something that fulfills their meaning (e.g. kdegames depends on a lot of games for kde) - in the default-* cases; they depend on the necessary parts of the "default" JVM to bring a JDK, JRE or a headless JRE.
As for the "default" then the full description of the package explains what it means:
Description: Standard Java or Java compatible Development Kit
This package points to the Java runtime, or Java compatible development kit recommended for this architecture, which is openjdk-6-jdk for i386.
This also explains why default-java is a symlink to openjdk-6 on your architecture.
Finally, to answer your question about which one a non-programmer should choose. You probably do not want a -jdk, but a -jre[1]. Personally I would pick default-jre in your case; it will always be provided by the best open source Java Debian/Ubuntu have to offer. java-alternativ es[2] as root.
That being said - /usr/bin/java (which is what you get by running "java" from a terminal and what most java programs will use) is controlled by "alternatives", so you can have multiple JVMs and choose your own local default by running (e.g.) update-
You are welcome to suggest new descriptions to default-jdk, default-jre and default- jre-headless. Also, please note that default-jre has a mistake in its description saying that the default is "openjdk-6-jdk" where it should have said "openjdk-6-jre". This has been fixed in java-common 0.36; however Ubuntu only as 0.34 as I recall.
~Niels
[1] "JDK" is short for "Java Development Kit" (it includes compilers and such), "JRE" is short for "Java Runtime Environment" which is needed for running java code. The "headless JRE" is a smaller JRE without support for graphical windows. The latter is preferred by servers, because it is smaller, but a normal JRE works just as well.
JRE headless is a subset of a JRE and a JRE is a subset of a JDK; therefore if you install a JDK you also install a JRE.
[2] Note that update- java-alternativ es have a bug in its "--list" option. This has been fixed java-common 0.36, which is probably not in Ubuntu.