db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: JDK 1.4 support?
Date Wed, 26 Nov 2008 08:22:56 GMT
Dag.Wanvik@Sun.COM (Dag H. Wanvik) writes:

> I think we just need one JDK (1.6), but we do need JREs for 1.4 and
> 1.5 to compile Derby successfully.

That's correct. JDK 1.6 is not required, though, so JRE 1.4 and JDK 1.5
should be enough if you don't care about JDBC 4.0 support.

> I am not sure BUILDING.txt reflects
> this, though. I agree it is a bit cumbersome for the would-be
> developer to have to download all that. I think we need the 1.4 JRE to
> make sure we maintain compatibility with JME CDC 1.1 Foundation
> profile (Constrained Device Configuration). Presently, there is a
> single build (one jar file version only) for embedded Derby.

What we need JRE 1.4 for is the JDBC 3.0 interfaces. We don't need JRE
1.4 for the compatibility with Foundation 1.1, but we need to compile
with source level 1.4 to stay compatible.

Since the JDBC 3.0 interfaces are the same in JRE 1.4 and JRE 1.5, it
should be possible to compile against JRE 1.5 instead of JRE 1.4. I have
tried that in the past, and the resulting jar files were usable on a
Java 1.4 platform. I haven't tried it lately, so I don't know if it is
still possible.

> It would have been nice if new developers didn't have to worry about
> that...

Agreed. First step would be to file a JIRA issue to remove the
compile-time dependency on JRE 1.4. Then we could consider the options
there. If we want to preserve compatibility with 1.4, I think we have
these alternatives:

1) Compile against the JDBC 3.0 interfaces from JRE 1.5, using source
level 1.4

2) Create stubs based on Apache Harmony's class library for compilation
of the JDBC 3.0 driver, much the same way as we did for JSR-169 in

With alternative (1) we'd need JRE 1.5 + JDK 1.6 to produce a full build
(JSR-169, JDBC 3.0, JDBC 4.0). With alternative (2) JDK 1.6 should be

Knut Anders

View raw message