xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Pogue <mpo...@apache.org>
Subject Re: [Proposal] Guidlines for package distribution of Java projects:like XML file being read by class
Date Wed, 24 Nov 1999 20:07:02 GMT

costin@eng.sun.com wrote:

> I still can't see any reason not to use a text file - and more important,
> the same format as in jdk1.2 documentations.
> For JDK1.2 packages everything will be a noop and the versioning system
> will be compatible with other packages.
> For JDK1.1 it is easy to read and parse the file - it's a very simple format.
>

I think we really need both ways:

a) at runtime, there must be a way to query the version string, AND
b) at install time, it's nice to be able to look at a JAR, and determine
what version it is, without running a program.


> The reason I think it's a bad ideea to have the version in a Java class:
> assume you want to automate it, i.e. you have several versions of the
> package installed, and you have a program that needs a specific version.
> 
> In order to find if x.jar has the right version, you need to load
> a.b.c.Version
> and call getVersion. If it's not good, you'll have to try another jar and
> check it
> - but then you have to deal with the ugly problem of class reloading.
>

I think it would be a bad idea to put several JAR files on your system,
where each one contains the same packages/classes, and then try to
dynamically pick up the correct one, if this is what you are
suggesting...

> Also, if a "human" want to check the name and  version of the package -
> instead of reading a file he will have to execute it.
>

Agreed.  A separate text file doesn't solve this, though.  A separate
text file can easily be separated from its JAR file (at installation
time, for example). A text file in the JAR would solve this, though.

Mime
View raw message