[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java-getopt

At 12:32 PM 8/27/01 +0100, Christopher William Turner wrote:
>If you do bundle getopt into sablecc jar, please change the class
>sablecc is used with other code which also uses getopt and
>may want a different version. Sun screwed up here by bundling
>old XML libraries with J2EE and caused me no end of grief.
>It really is no trouble to ship 2 jars. You just
>list the getopt jar in a manifest header of the sablecc jar.
>ClassPath: getopt.jar...

the problem with this strategy, which btw in the specific case of getopt 
does not help either way, is that the getopt pkg is distributed in a jar 
WITH the version number; eg. java-getopt-1.0.8.jar.  in other words, if we 
keep it separate for the sablecc distribution, we need then to either:

(a) reference it in the manifest as java-getopt-xxx.jar, or
(b) remove the version markings and reference the jar generically (similar 
to what the ASN1 kit does).

if (a) then if as long as there is one version of getopt, all is cool.  as 
soon as there are 2 versions --one used by sablecc, say version 1.0.8, and 
another used by the other application, say version 1.0.9; there is a problem!

if (b) again you have a problem when 2 different incompatible versions are 
to be found on the classpath.  nevertheless, if the package maintains 
backward compatibility, then having a newer version than the one used to 
release sablecc.jar should be no problem.

i dont see a 'perfect' solution.

renaming the classes is probably the closest to eliminating the above 
mentioned sorts of problems.  the disadvantage being, putting the onus on 
the SableCC developers to manually intervene if/when a new feature-needed 
version of the (getopt) package is released.  since we're dealing here with 
just a couple of classes and few properties files that is acceptable.

trusting that newer versions of the package will maintain backward 
compatibility is also reasonable, and hence referencing a generic name is 
ok.  the best would be for the author himself to do that and release the 
distribution as java-getopt.jar inside either a jar or a zip with the 
version number.  i already suggested that to the author, some time ago when 
i first started using the software, but it has not happened yet.  if we 
conclude that this is the way to go, may be then we can email the author to 
request the name change.

does this make sense?