Request to Java developers

The following is a list of guidelines for Java developers to help packaging and distributing Java software. This only addresses the Unix world, and more specifically Linux world, whereas Java is essantially cross-platform, which means these guidelines could be completly out of topic in other contexts. However, they are usually better applied upstream, and only represent slight additional work easily handled by standard Java build tools.

Provide source-only release

When building software from sources, binaries are only a waste of bandwidth and disk space. The same is true for Javadocs, generated docs, and so on. But nothing prevents for providing also a binary release.

Don't provide external binaries

Including external binaries is evil because:

  • They are useless for people trusting only self-built software.
  • They are useless for people who already have those binaries.
  • It makes tracking dependencies a nightmare.
  • It makes archives bigger.

But nothing prevents for providing also those binaries in a separate archive.

Provide all sources and resources needed for building

It is always a pain to not have a doclet sources, or an Ant build script, as it prevents to recreate original building process.

Provide Unix archives

The zip format doesn't preserve Unix file permissions, and is inefficient. Gzipped, or even better, bzipped tarballs are more convenient. But nothing prevents for providing also zip format archives.

Do not use Class-Path references in MANIFESTs

The Class-Path system of MANIFESTs is evil because:

  • It doesn't work with JDK 1.x.
  • It only works at runtime, not at build time.
  • It only works for a specific installation hierarchy.
  • It can not be configured.

Wrapper scripts are much versatile and universal. We provide a set of convenient shell helper functions for setting up such Unix scripts easily (see jpackage-utils in project CVS).