[jdom-interest] TODO.TXT: jdom.jar main method and class
Steven Gould
steven.gould at cgiusa.com
Thu Feb 22 18:11:38 PST 2001
After getting busy at work, I've finally got around to implementing some of
this. Before I submit it I was looking for some feedback and/or suggestions.
I propose adding a META-INF/jdom-info.xml file to the JDOM JAR, as well as an
org.jdom.Main class. My initial jdom-info.xml file is as follows:
>>>>>>>>>>> jdom-info.xml <<<<<<<<<<<<
<?xml version="1.0"?>
<jdom-info>
<Version>1.0 Beta 6</Version>
<Description>
JDOM is a Java-oriented object model which models XML documents.
It provides a Java-centric means of generating and manipulating
XML documents. While JDOM interoperates well with existing
standards such as the Simple API for XML (SAX) and the Document
Object Model (DOM), it is not an abstraction layer or
enhancement to those APIs. Rather, it seeks to provide a robust,
light-weight means of reading and writing XML data without the
complex and memory-consumptive options that current API
offerings provide.
</Description>
<!--
The following list of authors was initially extracted from @author
comments in the code. Apologies if anyone has been left out.
-->
<Author>
<Name>Brett McLaughlin</Name>
<E-mail>brett at jdom.org</E-mail>
</Author>
<Author>
<Name>Jason Hunter</Name>
<E-mail>jhunter at jdom.org</E-mail>
</Author>
<Author>
<Name>Steven Gould</Name>
<E-mail>steven.gould at cgiusa.com</E-mail>
</Author>
<Author>
<Name>Alex Chaffee</Name>
<E-mail>alex at jguru.com</E-mail>
</Author>
<Author>
<Name>Dan Schaffer</Name>
</Author>
<Author>
<Name>David and Will (from Post Tool Design)</Name>
</Author>
<Author>
<Name>Elliotte Rusty Harold</Name>
</Author>
<Author>
<Name>Fred Trimble</Name>
</Author>
<Author>
<Name>Jason Reid</Name>
</Author>
<Author>
<Name>Kevin Regan</Name>
</Author>
<Author>
<Name>Lucas Gonze</Name>
</Author>
<Author>
<Name>Matthew Merlo</Name>
</Author>
<Author>
<Name>Philip Nelson</Name>
</Author>
<Author>
<Name>Wesley Biggs</Name>
</Author>
<Author>
<Name>Wolfgang Werner</Name>
</Author>
<Author>
<Name>Yusuf Goolamabbas</Name>
</Author>
</jdom-info>
>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<
Now, if you run the JAR using java -jar jdom.jar the output would be
something like:
>>>>>>>>>>> Sample output <<<<<<<<<<<<
$ java -jar jdom.jar
JDOM version 1.0 Beta 6
JDOM is a Java-oriented object model which models XML documents. It provides
a Java-centric means of generating and manipulating XML documents. While JDOM
interoperates well with existing standards such as the Simple API for XML
(SAX) and the Document Object Model (DOM), it is not an abstraction layer or
enhancement to those APIs. Rather, it seeks to provide a robust, light-weight
means of reading and writing XML data without the complex and
memory-consumptive options that current API offerings provide.
Authors:
Brett McLaughlin <brett at jdom.org>
Jason Hunter <jhunter at jdom.org>
Steven Gould <steven.gould at cgiusa.com>
Alex Chaffee <alex at jguru.com>
Dan Schaffer
David and Will (from Post Tool Design)
Elliotte Rusty Harold
Fred Trimble
Jason Reid
Kevin Regan
Lucas Gonze
Matthew Merlo
Philip Nelson
Wesley Biggs
Wolfgang Werner
Yusuf Goolamabbas
>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<
Any comments/suggestions? In the mean time, I'll clean up my code ready to
submit to the group.
Thanks in advance,
Steve
---
Jason Hunter wrote:
> steven.gould at cgiusa.com wrote:
> >
> > All,
> >
> > I've been looking through some of the things in the TODO.TXT file, and
> > had some questions about this item:
> >
> > >>>
> >
> > * Look at putting XML files in the jdom.jar META-INF directory for
> > things like version, credits, description, etc, then access/print the
> > info using JDOM classes executed by a "java -jar jdom.jar" command. See
> > http://java.sun.com/docs/books/tutorial/jar/
> >
> > <<<
> >
> > I've created a META-INF directory and a MANIFEST.MF file for it and got
> > it "compiled" into the jdom.jar as intended. Using the java -jar
> > jdom.jar command, we would need to specify a main routine to run - which
> > could display the version information, etc. Does anyone (esp. Jason or
> > Brett) have any thoughts, ideas, suggestions, etc. as to what class the
> > main method should be in?
>
> Good question, Steven. Glad to see the TODO is being put to good use.
>
> I would propose main() go in a Main class in the default (".") package.
> That gives us the functionality we want without altering the public API
> of anything under org.jdom. We also don't have to compile the Main
> class unless we're building the JAR.
>
> -jh-
More information about the jdom-interest
mailing list