Unfortunately, this doesn't work for Java. Even if you put two JARs with different names on the CLASSPATH, and a package tries to load a class that exists in both JARs, then Java will load whatever it happens to see first. There is no way packages can explicitly request a version number for a JAR.
This is a problem for me because I'm trying to write a Fink package description for a Java library called Saxon. Some packages require Saxon 8.1.1, since that was the last version to fully support Java 1.4, while others require the newer features of Saxon 8.2 or higher. Therefore, Fink must be able to supply either of the two versions, depending on what the user needs, but the two packages cannot both be installed at the same time because of the lack of versioning in Java.
One way of solving this is to provide two packages, saxon and saxon811. Each package can reference the other in its Conflicts field. However, this means that packages depending on *any* version of Saxon must specify "Depends: saxon | saxon811". Otherwise (if they only specify "Depends: saxon"), installing a package requiring Saxon 8.1.1 would force those packages to be removed.
Another way of solving this is to have packages that require Saxon 8.1.1 to specify "Depends: saxon (= 8.1.1)". However, this brings about other problems. Namely, how can Fink's repository hold package descriptions for both Saxon 8.1.1 and Saxon 8.whatever if they both have the same name ("saxon")?
Any suggestions on what to do? Thanks, Trevor
smime.p7s
Description: S/MIME cryptographic signature