         </java>
      </target>
  
-@@ -244,6 +249,7 @@
+@@ -218,6 +232,7 @@
+       <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
+         <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
+         <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
++        <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
+         <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
+         <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
+         <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/>
+@@ -244,6 +259,7 @@
          <arg value="+JAVA2FULL"/>
          <arg value="+JAVA4"/>
          <arg value="-JAVA6"/>

        </java>
     </target>
 
@@ -279,10 +285,47 @@
         <arg value="+JAVA2FULL"/>
         <arg value="+JAVA4"/>
         <arg value="+JAVA6"/>
+        <arg value="+JAVA7"/>
+      </java>
+    </target>
+
+    <target name="switchtojdk17" depends="switchtojdk16"
+            description="self explanatory" if="ant.java.iscjava17">
+      <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
+        <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
+        <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
+        <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
+        <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
+        <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>

+        <arg value="+JAVA2FULL"/>
+        <arg value="+JAVA4"/>
+        <arg value="+JAVA6"/>
+        <arg value="-JAVA7"/>
+      </java>
+    </target>
+
+    <target name="switchtojdk17" depends="switchtojdk16"
+            description="self explanatory" if="ant.java.iscjava17">
+      <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
+        <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
+        <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
+        <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
         <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
         <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
         <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/>
@@ -279,10 +332,11 @@
         <arg value="+JAVA2FULL"/>
         <arg value="+JAVA4"/>
         <arg value="+JAVA6"/>
+        <arg value="+JAVA7"/>
       </java>
     </target>
