[jdom-interest] Re: TODO.TXT: jdom.jar main method and class

Jason Hunter jhunter at collab.net
Fri Feb 23 10:50:27 PST 2001

steven.gould at cgiusa.com wrote:
> Joseph Bowbeer wrote:
> > I'm familiar with executable .jar files, but JDOM is not a server, and I
> > don't know of any pure libraries that are executable.
> >
> > I'm concerned about adding anything to the default package.  (What if
> > everyone did that?)
> I agree. I put it in the default package initially based on some of Jason's earlier
> comments. However, I then decided that putting anything in the default package was
> "dangerous". Like you say, "what if everyone did that?" Isn't that defeating the
> purpose of packages in the first place?

OK, several people have asked the question, "What if everyone did
that?"  But no one has answered the question.  :-)  I don't yet see the
problem if everyone did that.  You'd have JARs with Main classes, the
manifest in each would point at the Main, and you could execute any of
the jar files with "java -jar foo.jar".  Other JARs might have Main
classes in the default package, but they would be properly shadowed by
the Main in the JAR being executed.  There'd be no conflict.

> Jason, I liked your earlier ideas about changing "jdom-info" to a more generic
> "info" document and filename. I'll make those changes.


> > > Failing that, would it be preferable to put Main in *some* package?  For
> > > example: org.jdom.info
> Good idea.


> > That would make it part of JDOM itself.  If it's not in org.jdom it's
> > ancillary.  In other words, when we write the JDOM spec, this won't be
> > in there.
> Why won't it be in there? If it's an issue here, then perhaps it should be in the
> spec. I mean, perhaps the JDOM spec. should include some way of accessing version
> information, etc. - a little like convention that most Windows (MS and X) include a
> Help, About dialog. That really isn't a core part of the product, but it still
> serves a very valuable purpose.

The standard convention of a README works fine.  I see this as an easter


More information about the jdom-interest mailing list