Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / March 2005

Tip: Looking for answers? Try searching our database.

Hypersonic JDBC driver probs

Thread view: 
Jeffrey Spoon - 09 Mar 2005 16:33 GMT
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.

Signature

Jeffrey Spoon

Jeffrey Spoon - 09 Mar 2005 16:59 GMT
Never mind I got it.

Signature

Jeffrey Spoon

Robert Klemme - 09 Mar 2005 16:59 GMT
> 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



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.