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

steven.gould at cgiusa.com steven.gould at cgiusa.com
Fri Feb 23 08:03:31 PST 2001


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?

> ----- Original Message -----
> From: "Jason Hunter" <jhunter at collab.net>
> To: "Joseph Bowbeer" <jozart at csi.com>
> Cc: <jdom-interest at jdom.org>
> Sent: Thursday, February 22, 2001 9:08 PM
> Subject: Re: [jdom-interest] Re: TODO.TXT: jdom.jar main method and class
>
> > I'm wondering about the idea of making jdom.jar executable.
> >
> > I wouldn't expect anything in my /lib/ext to be executable, and I'm a
> little
> > concerned about adding a Main class to the default package in every JDOM
> > user's classpath.
>
> It's common for JAR files these days to be executable.  For example, you
> start the Orion app server by executing its JAR.  In the manifest you
> can point at a class to execute.  For this scheme we'll have a little
> Main class that uses the JDOM classes to read and display its info.xml
> information.  Most packages would just leave info.xml static for manual
> reading, but we can have our easter egg.  :-)

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.




More information about the jdom-interest mailing list