Hello. I'm trying to load the Hypersonic 1.61 JDBC driver in a simple
program:
import java.sql.*;
public class Buddy {
public static void main(java.lang.String[] args) throws SQLException {
try {
// This is where we load the driver
Class.forName("org.hsqldb.jdbcDriver");
}
catch (ClassNotFoundException e) {
System.out.println("Unable to load Driver Class");
return;
}
}//main
}//class Buddy
No matter what I try I always get "Unable to load Driver Class"
The hsqldb.jar is in C:\JAVA, the Buddy file is also there. The actually
databse gubbins are installed in C:\JAVA\hsqldb_v.1.61
What classpath should I use?
java -classpath %CLASSPATH%;C:\JAVA\hsqldb.jar: Buddy
can't find the Buddy class and
java -classpath %CLASSPATH%;C:\JAVA\hsqldb.jar: Buddy
says it can't find the driver.
Any ideas?
The reason I'm using 1.6.1 is because I'm eventually going to use it on
myjavaserver.com which uses version 1.6.0 and 1.6.1 is the closest
version available. I am using the 1.4.2.04 SDK.
> Hello. I'm trying to load the Hypersonic 1.61 JDBC driver in a simple
> program:
[quoted text clipped - 27 lines]
>
> java -classpath %CLASSPATH%;C:\JAVA\hsqldb.jar: Buddy
^
remove the colon. ------------------------------+
> can't find the Buddy class and
>
> java -classpath %CLASSPATH%;C:\JAVA\hsqldb.jar: Buddy
Isn't this the exact same command line?
Kind regards
robert
> says it can't find the driver.
>
[quoted text clipped - 3 lines]
> myjavaserver.com which uses version 1.6.0 and 1.6.1 is the closest
> version available. I am using the 1.4.2.04 SDK.
Jeffrey Spoon - 09 Mar 2005 17:06 GMT
>> What classpath should I use?
>>
[quoted text clipped - 7 lines]
>
>Isn't this the exact same command line?
Oops. I meant to put:
java Buddy -classpath %CLASSPATH%;C:\JAVA\hsqldb.jar: Buddy
java -classpath %CLASSPATH%;C:\JAVA\hsqldb.jar;C:\Java Buddy
got it working ok.
Cheers,

Signature
Jeffrey Spoon