It's easy enough to add the dozens of new JDBC 4.0 methods to
SQLiteJDBC in this fashion in order to build under JDK 1.6:
--- src/org/sqlite/Conn.java-orig 2007-08-27 11:41:49.000000000 -0400
+++ src/org/sqlite/Conn.java 2007-08-27 11:55:02.000000000 -0400
@@ -217,4 +217,8 @@
public void rollback(Savepoint savepoint) throws SQLException {
throw new SQLException("unsupported by SQLite: savepoints"); }
+ public Struct createStruct(String typeName, Object[] attributes)
+ throws SQLException { throw new SQLException("NYI"); }
+ public Array createArrayOf(String typeName, Object[] elements)
+ throws SQLException { throw new SQLException("NYI"); }
}
But there are some new methods that use new classes in JDK 1.6/JDBC 4.0,
such as java.sql.SQLXML:
public SQLXML createSQLXML()
If these new methods are added, then the sqlitejdbc source code could not
be compiled or used with Java 1.4/1.5 without some sort of lame extra
backwards compatibility jar file containing fake versions of the new classes.
I think you may need 2 different source trees to support building JDBC 3.0
and JDBC 4.0 drivers going forward.
--- Joe Wilson <[EMAIL PROTECTED]> wrote:
> That's interesting. It appears that Sun has added several new
> abstract methods to the java.sql.Connection class in JDK 1.6.
> You have to install JDK 1.5 and rebuild it to work around this problem.
>
> It's odd that you can run a JDK 1.4/1.5 compiled sqlitejdbc jar file
> in Java 1.6, but not compile it in JDK 1.6. Maybe if you compiled
> sqlitejdbc under JDK 1.6 with "javac -source 1.4 -target 1.4" it might
> work, but I doubt it.
>
> I wonder how all the other JDBC drivers handle this JDK 1.5/1.6 driver
> incompatibility mess.
>
> --- Dan <[EMAIL PROTECTED]> wrote:
> > Is till have some problems on compiling the jdbc driver on Solaris
> > sparc9
> > I installed curl installed new jdk6 and when I do a make I get these
> > errors:
> >
> > [EMAIL PROTECTED] /home/Homedev/sqlitejdbc-v036> make
> > unzip -qo dl/sqlite-3.4.0.zip -d build/sqlite-3.4.0-Default-sun4u
> > perl -pi -e "s/sqlite3_api;/sqlite3_api = 0;/g" \
> > build/sqlite-3.4.0-Default-sun4u/sqlite3ext.h
> > rm build/sqlite-3.4.0-Default-sun4u/tclsqlite.c
> > (cd build/sqlite-3.4.0-Default-sun4u; gcc -c -I/usr/jdk1.6.0_02/bin//
> > include -O
> > -fPIC -Ibuild/sqlite-3.4.0-Default-sun4u -Ibuild \
> > -DSQLITE_ENABLE_COLUMN_METADATA \
> > -DSQLITE_CORE \
> > -DSQLITE_OMIT_LOAD_EXTENSION *.c)
> > javac -source 1.2 -target 1.2 -sourcepath src -d build src/org/sqlite/
> > Codes.java
> > javac -source 1.2 -target 1.2 -sourcepath src -d build src/org/sqlite/
> > Conn.java
> > src/org/sqlite/Conn.java:9: org.sqlite.Conn is not abstract and does
> > not override abstract method
> > createStruct(java.lang.String,java.lang.Object[]) in
> > java.sql.Connection
> > class Conn implements Connection
> > ^
> > src/org/sqlite/MetaData.java:5: org.sqlite.MetaData is not abstract
> > and does not override abstract method
____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---