[jdom-interest] jdom.jar file naming convention

Patrick Dowler Patrick.Dowler at nrc.ca
Fri Jun 23 10:40:49 PDT 2000


On Fri, 23 Jun 2000, you wrote:
> > At 3:26 PM -0700 6/22/00, Alex Chaffee wrote:
> > >I have a request.  In future versions, please name the jar file
> > >"jdom.jar" and not "jdom-b5.jar".  That way users don't have to change
> > >their classpaths, and/or rename files, and/or worry about old versions
> > >laying around.  We can just unzip and go.
> > 
> > I prefer having the version number in the JAR name. Rather than
> > putting the jar file in my CLASSPATH I just drop it in my jre/lib/ext
> > directory. Then the name doesn't matter.

Since you can't leave both in there (who knows which one gets read first)
the name hardly matters and a name collision from jdom.jar is actually a good
thing... 

"overwrite jdom.jar? (y/n)"

> Not everyone has write privs in that dir, or runs a JRE that looks there
> (such as a servlet runner JRE).  What benefit do you get from the
> version in there?  Are you archiving all the old stuff?  :-)

When I make jar files that are non-application packages, I usually
put a Version.class in there with a main method. Then people
can do "java -jar myjarfile.jar" and see the version message. This
mostly negates the need for a version number in the file name.

As a fancy alternative, jdom.jar could have a simple jdom program that
read the various XML files in the jar file and printed a nice message
about versions etc... It would make a useful tool and a nice simple
example program all in one :-)

That example/usage/version program would be the one that runs 
under the -jar option (for java2).

-- 

Patrick Dowler
Canadian Astronomy Data Centre




More information about the jdom-interest mailing list