[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Developing with Java on Debian



Richard Cole wrote:
So I'm still wondering how the packaging of java packages in Debian works.

Lets say that I do some more research on Hibernate and discover it
really cannot run without Log4j because classes in Hibernate directly
reference Log4j. [1] Then I submit a bug report and the dependency
gets added. Where's the classpath? Are there any tools for (i) working
out whether a classpath is closed with respect to resolution of direct
class references [2], (ii) do java libraries in debian express their
classpath? Should they have a classpath, something like
/usr/share/java/hibernate-annotations-1.2.jar.classpath ?

The current state doesn't (so far as I understand) seem very good since the idea is to put jars under /usr/share/java or perhaps /usr/share/xyzzy and the package probably works out the classpath based on assuming everything is there.

However I've been talking with the people who are developing the modules support planned for Java 7 (JSR 277). Something I've asked them is how this should play out for the linux distros (in general). What they're telling me is it will be possible for a distro (e.g. Debian) to have a module repository built into the packaging system. With that the Java runtime would be automatically able to handle a lot of this for you.

This will require some kind of glue layer (service provider implementations) to interface ... But that's Java 7, and by the statement we made at JavaOne last month it won't be available until mid-2009.

As for today...

http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html
http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html

Jar files can directly express their classpath requirements using the Class-Path entry in the JAR manifest. I suppose the debian packaged jar's could interpolate their dependencies into these JAR manifest entries. No need for a separate file.


- David Herron



Reply to: