Hi Carfiled, The build process has changed over different versions. We cannot change it as you suggest, as the issue is not just the use of collections and io stuff. The primary issue that requires different JDK's is the changes in java.sql interfaces between different JDK releases.
For building for 1.1 with 1.3, you do not use switchtojdk11. The current version of readmebuild.txt has the instructions as follows: ant switchtojava1target The jars compiled after this switch will run under JRE 1.3 too, but they use some deprecated JDK 1.1 methods. To switch back to non-deprecated code, use: ant switchoffjava1target Fred ----- Original Message ----- From: "Carfield Yim" <[EMAIL PROTECTED]> To: <[email protected]> Sent: 07 March 2005 08:16 Subject: [Hsqldb-developers] Fwd: Small developer tasks for 1.8.0 Sorry of post to user list... now it is in dev list.... Besides, I will think that using pre-processor to build and maintain multiple jdk version suppost is tedious... how about abstract all variation to a custom util/io package ( I guess probably only IO and collection, may be more but probably doable? ) And then when we build and deploy, we using difference util/io package for target java version, how do you think about it? On Mon, 7 Mar 2005 15:59:13 +0800, Carfield Yim <[EMAIL PROTECTED]> wrote: > Sorry for very very late reply... recently very busy.... > > First I try to use 1.5 to compile and test, then I get > classes: > [javac] Compiling 99 source files to C:\temp\source\hsqldb\classes > [javac] javac: target release 1.1 conflicts with default source > release 1.5 > > Then I try to compile using 1.1, as readme saying that only the jar is > bigger, so it should be ok for testing, but what I get is: > > C:\temp\source\hsqldb\build>c:\javatools\ant\bin\ant jar > Unable to initialize threads: cannot find class java/lang/Thread > C:\temp\source\hsqldb\build> > > So finally I try the recommended approach, which is using JDK 1.3 to > compile... but again getting error: > > BUILD SUCCESSFUL > Total time: 1 second > C:\temp\source\hsqldb\build>c:\javatools\ant\bin\ant jar > Buildfile: build.xml > > init: > > -javaversion4: > > javaversion2: > > -prepare: > > codeswitcher: > > switchtojdk11: > [java] .......... > > switchtojdk12: > > switchtojdk14: > > store: > [javac] Compiling 6 source files to C:\temp\source\hsqldb\classes > > lib: > [javac] Compiling 39 source files to C:\temp\source\hsqldb\classes > [javac] Note: > C:\temp\source\hsqldb\src\org\hsqldb\lib\java\JavaSystem.java uses or > overrides a deprecated > API. > [javac] Note: Recompile with -deprecation for details. > > -javajsse: > [echo] ant.java.hasjsse=${ant.java.hasjsse} > > classes: > [javac] Compiling 99 source files to C:\temp\source\hsqldb\classes > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcConnection.java:1621: > cannot resolve symbol > [javac] symbol : class Map > [javac] location: class org.hsqldb.jdbc.jdbcConnection > [javac] public synchronized Map getTypeMap() throws SQLException > { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcConnection.java:1656: > cannot resolve symbol > [javac] symbol : class Map > [javac] location: class org.hsqldb.jdbc.jdbcConnection > [javac] public synchronized void setTypeMap(Map map) throws > SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcResultSet.java:4014: > cannot resolve symbol > [javac] symbol : class Map > [javac] location: class org.hsqldb.jdbc.jdbcResultSet > [javac] public Object getObject(int i, Map map) throws > SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcResultSet.java:4043: > cannot resolve symbol > [javac] symbol : class Ref > [javac] location: class org.hsqldb.jdbc.jdbcResultSet > [javac] public Ref getRef(int i) throws SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcResultSet.java:4141: > cannot resolve symbol > [javac] symbol : class Array > [javac] location: class org.hsqldb.jdbc.jdbcResultSet > [javac] public Array getArray(int i) throws SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcResultSet.java:4177: > cannot resolve symbol > [javac] symbol : class Map > [javac] location: class org.hsqldb.jdbc.jdbcResultSet > [javac] public Object getObject(String colName, Map map) > throws SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcResultSet.java:4210: > cannot resolve symbol > [javac] symbol : class Ref > [javac] location: class org.hsqldb.jdbc.jdbcResultSet > [javac] public Ref getRef(String colName) throws SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcResultSet.java:4300: > cannot resolve symbol > [javac] symbol : class Array > [javac] location: class org.hsqldb.jdbc.jdbcResultSet > [javac] public Array getArray(String colName) throws > SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcPreparedStatement.java:1302: > cannot resolve symbol > [javac] symbol : class Ref > [javac] location: class org.hsqldb.jdbc.jdbcPreparedStatement > [javac] public void setRef(int i, Ref x) throws SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcPreparedStatement.java:1506: > cannot resolve symbol > [javac] symbol : class Array > [javac] location: class org.hsqldb.jdbc.jdbcPreparedStatement > [javac] public void setArray(int i, Array x) throws SQLException > { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcCallableStatement.java:1016: > cannot resolve symbol > [javac] symbol : class Map > [javac] location: class org.hsqldb.jdbc.jdbcCallableStatement > [javac] public Object getObject(int i, Map map) throws > SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcCallableStatement.java:1046: > cannot resolve symbol > [javac] symbol : class Ref > [javac] location: class org.hsqldb.jdbc.jdbcCallableStatement > [javac] public Ref getRef(int i) throws SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcCallableStatement.java:1076: > cannot resolve symbol > [javac] symbol : class Blob > [javac] location: class org.hsqldb.jdbc.jdbcCallableStatement > [javac] public Blob getBlob(int i) throws SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcCallableStatement.java:1106: > cannot resolve symbol > [javac] symbol : class Clob > [javac] location: class org.hsqldb.jdbc.jdbcCallableStatement > [javac] public Clob getClob(int i) throws SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcCallableStatement.java:1136: > cannot resolve symbol > [javac] symbol : class Array > [javac] location: class org.hsqldb.jdbc.jdbcCallableStatement > [javac] public Array getArray(int i) throws SQLException { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcResultSet.java:321: > org.hsqldb.jdbc.jdbcResultSet sh > ould be declared abstract; it does not define getBlob(int) in > org.hsqldb.jdbc.jdbcResultSet > [javac] public class jdbcResultSet implements ResultSet { > [javac] ^ > [javac] > C:\temp\source\hsqldb\src\org\hsqldb\jdbc\jdbcPreparedStatement.java:210: > org.hsqldb.jdbc.jdbcPrep > aredStatement should be declared abstract; it does not define > setBlob(int,java.sql.Blob) in org.hsqldb.jdbc.jd > bcPreparedStatement > [javac] public class jdbcPreparedStatement extends jdbcStatement > [javac] ^ > [javac] Note: Some input files use or override a deprecated API. > [javac] Note: Recompile with -deprecation for details. > [javac] 17 errors > > BUILD FAILED > C:\temp\source\hsqldb\build\build.xml:231: Compile failed; see the > compiler error output for details. > > Then I open one of the java file, jdbcConnection.java, I find that > java.util.Map is commented out, and it still using in the code. > > I catch a bug or I miss some step for build? I run the following task: > ant switchtojdk11 > ant switchtojava1target > ant jar > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ hsqldb-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hsqldb-developers ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ hsqldb-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hsqldb-developers
