← Back to team overview

openjdk team mailing list archive

[Bug 518948] Re: Default Java paths aren't set up by default

 

I think there is a bit of misunderstanding here.

"default-java" is not an alternative that can be served by any JDK/JVM
(like the "java" command). It points to the default implementation of
Java for your platform. In Ubuntu on amd64 and i386, the default Java
stack is OpenJDK. It's an indirection that, amongst other things, helps
migrating to a new default Java (OpenJDK-7 ?) when available.

So third-party applications that point to "default-java" do explicitly
ask to use OpenJDK and not Sun's JDK. They should be changed to allow
for a less strict dependency. Tomcat, for example, looks in its init
script for JVMs in a list of potential paths, and allows you to change
(in its /etc/defaults file) which one should be used.

Closing as Invalid for the JDKs, feel free to open tasks against the
"third-party apps".

** Changed in: sun-java6 (Ubuntu)
       Status: New => Invalid

** Changed in: openjdk-6 (Ubuntu)
       Status: New => Invalid

-- 
Default Java paths aren't set up by default
https://bugs.launchpad.net/bugs/518948
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in ubuntu.

Status in “openjdk-6” package in Ubuntu: Invalid
Status in “sun-java6” package in Ubuntu: Invalid

Bug description:
I did not file this bug against a package as it seems to be more like an infra-structure problem.

If I install the Sun Java Developer Kit ('sun-java6-jdk') it gets installed in '/usr/lib/jvm/java-6-sun'. Most 3rd party applications look for this in '/usr/lib/jvm/default-java'. The standard solution is to create a symbolic link from  '/usr/lib/jvm/java-6-sun'  to  '/usr/lib/jvm/default-java'. This is, however, not done automatically unless I install the 'default-jdk' package which installs the 'openjdk-6-jdk' package. So, if I only want the Sun JDK I have to manually create the symlink. This link does not seem to be create by 'sudo update-java-alternatives -s java-6-sun' unless I install the 'default-jdk' package.

Okay, this description was a bit convoluted, but the problem itself seems to be rather convoluted. I would have expected the following behavior:

  * When I install _any_ JDK the corresponding  '/usr/lib/jvm/default-java' if it does not already exist.

  * When I run 'sudo update-java-alternatives -s java-6-sun' I would expect  '/usr/lib/jvm/default-java' to be created even if I don't have the 'default-jdk' package installed.





Follow ups