<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
<blockquote cite="mid00c301c75a53$6cddf760$6401a8c0@turtle" type="cite">
<pre wrap=""><blockquote type="cite"><pre wrap="">What happens when Software A uses JDOM 2.0 while Software B uses JDOM<span
class="moz-txt-citetags"> </span>1.0, and you want to write Software C that uses both Software A and<span
class="moz-txt-citetags"> </span>Software B? Can you just drop in JDOM 2.0, ignore JDOM 1.0, and have<span
class="moz-txt-citetags"> </span>Software B (built maybe against an old version of Java) satisfied?<span
class="moz-txt-citetags"> </span><!---->Anyone have experience with this?
</pre></blockquote>As discussed previously on this list, adding generics but no other new
features should be backwards compatible with APIs requiring JDOM 1.0,
just like the generified java.util.* collections in JDK 1.5 are
backwards compatible with older APIs.
You need to be very careful what you mean by "backwards compatible".
I think the following statements are true:
(a) if the JDOM interfaces are changed to use generics, then the JDOM code
must be compiled under JDK 1.5, in which case it will only run under JDK 1.5
or later, and any client applications must therefore be run under JDK 1.5,
though they do not need to be recompiled.
(b) if you compile JDOM under 1.5, even without any source code changes, and
users drop it in as a replacement for the existing JAR file, then if they
are running 1.4 their applications will stop working.
Yes, of course.<br>
"Backwards compatible" was with regards to the quote which you removed
If API A is compiled under JDK 1.4 against JDOM 1.0 and API B is
compiled under JDK 1.5 against generified JDOM 1.5, both APIs can be
used in software C - assuming JDK 1.5 of course.<br>
As I said, just compare to the standard JDK runtime classes. In our JDK
1.5 environment, we use lots of APIs compiled against JDK 1.4 (or
older) runtime classes. One example is JDOM...<br>