Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I import jar package of HSQLDB?

807600Oct 8 2007 — edited Oct 9 2007
I have this problem which is killing me.

I am trying to use the jar-package of HSQLDB to run a database for the first time with a application I am writing. What I have done is
1. I have download the HSQLDB-jar files
2. I have extract them to the same folder as my main-java-class.
3. I want to connect by writing
Connection c = DriverManager.getConnection("jdbc:hsqldb:file:testdb", "sa", "");
4. I have followed instructions exactly and I am importing
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
But Java doesn't recognize
DriverManager
Should I import the hsqldb too? How should I address them? Like
import hsqldb.*;
because the hsqldb folder's name is hsqldb and it is in the same folder as my main-class.
Anyone can help me out??? There are no good simple instructions out there. I promise I have been looking for 2 days now. THX
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2007
Added on Oct 8 2007
7 comments
639 views