Menu

#3 Distribution

open
nobody
None
5
2003-06-08
2003-06-08
Anonymous
No

Please could you distribute it as a JAR file?

This would be the source plus compiled class files,
plus docs, all in one JAR file.

There are several advantages:

1. JAR files have a special system that enables one JAR
file to reference other JAR files that it requires, and
automatically include the contents in the Classpath.
This makes it much easier to deploy - you just download
the current JAR file, and drop it into the same
directory as the JAR fiel for your own application.

2. 99.9% of users will not have any reason to recompile
the source; providing them with a precompiled version
makes life a bit easier for many people (make files are
NOT widely used in java development; perhaps they
should be, but the fact is they aren't).

3. The official guidelines from Sun strongly suggest
(require?) that libraries be distributed as JAR files.
A small reason perhaps, but why not?

4. The Main-Class manifest attribute in a JAR file
enables people to launch the JAR with "java -jar". The
classic example of using this in a library is making
the test-class run automatically. This way, you have a
self-testing archive!

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.