ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "W. Sean Hennessy" <>
Subject RE: Branching on Java version
Date Mon, 09 Jun 2003 16:51:33 GMT

You need the ability to select which JVM and JDK environment in ant to build into corresponding OurDataInterfaceFor${thisversion}.jar
using explicit source revision of extracted from

-----Original Message-----
From: Sauyet, Scott (OTS-HAR) []
Sent: Monday, June 09, 2003 8:49 AM
To: 'Ant Users List'
Subject: RE: Branching on Java version

> The java developers are submitting code that does not execute in the
> production environment?
> What is the world coming too?!

No, that's not quite it.  It's a compilation issue, not a runtime one.
I have two versions of a class.  Either will work at runtime.  But one
will compile with 1.3 and not 1.4.  Vice versa for the other.

Between 1.3 and 1.4, Sun added a number of methods to the
java.sql.Connection interface.  For instance they added a method with the
following signature:

    public void releaseSavepoint(java.sql.Savepoint savepoint)
                                 throws java.sql.SQLException

I can implement this easily in my class, and compile it under 1.4.  But
then this will not compile with 1.3, because java.sql.Savepoint is also
new to 1.4.  I can't even copy it into my code, since it is under the
"java.*" hierarchy.  One that compiles under 1.3 will not compile under
1.4 since it does not contain the above method.

If I could get all developers to be on the same java version as the target
runtime environment, there would be no issue.  If I could get them all to
1.4, there would not be an issue, since these new methods are never
actually called.

And in six months, the production environment is scheduled to migrate to
1.4.  When that happens, I can insist that the developers upgrade to match.
(Just about then, I excpect 1.5 to be out of beta...)  I'm hoping to find
some build stopgap that will let us work without worrying too much about
what is for us really just a low-level plumbing issue.

> I would submit that the build is not the correct place to fix runtime
> behavior.

Agreed, but I don't think that is the issue.

> Persuade the authors of the java class to implement a little adaptability.
> The class should be able to discern the JDK version at runtime and select
> the appropriate connector.

Only if I can compile it.  :-)

Thanks for your response,

  -- Scott

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message