Calling the package 'default-jdk' is not user friendly

Bug #564699 reported by hasan adil
8
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?

Revision history for this message
Niels Thykier (niels-thykier) wrote :

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.
  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-java-alternatives[2] as root.

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-alternatives have a bug in its "--list" option. This has been fixed java-common 0.36, which is probably not in Ubuntu.

Revision history for this message
hasan adil (hasank2) wrote :

Hi,
Thanks for the excellent explanation and I can see why its named as it is. I setup an experiment with a friend who is not a tech user and was recording what usability issues she runs into with Ubuntu (without any other person to help her) and this was one of them. So asked on her behalf and many other people who run win or mac and may want to try ubuntu. I do a lot of java dev and run every jdk since 1.1 :D

It would be good to have the java runtime packages included as part of ubuntu installation, it would be easy to do so.

Revision history for this message
Niels Thykier (niels-thykier) wrote :

Hi again and sorry for the late reply,

That is an interesting experiment. :)

Getting java installed by default is not likely to happen. Java runtimes are not exactly "cheap" space-wise and a lot of setups do not need it. Technically it is possible to rename the packages themselves, but it is not trivial to implement[1]. So I would prefer just updating the description.
  If you or your "guinea pig" (test person) have any suggestions to an upgrade let me know, else I will brew something together.

~Niels

[1] Lots of packages depends on default-jre-headless, default-jre or default-jdk, plus a lot of Debian/Ubuntu people has been taught to use these packages.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.