How to install a JDBC driver?

Hello, everybody!

I'm new to Java and I'm trying to install a JDBC driver. So, I downloaded the JayBird,

a JDBC driver for Firebird, and now I don't know how to install the driver. I keep

getting this message from the compiler when I try to compile the example that comes

with the driver:

DriverExample.java:182: package org.firebirdsql.jdbc does not exist

d = new org.firebirdsql.jdbc.FBDriver ();

^

1 error

So, in the directory that has the example file (DriverExample.java) I created the

following directory structure:

C:\Example\org\firebirdsql\jdbc

and inside the jdbc directory I copied the driver files:

firebirdsql.jar

mini-concurrent.jar

jaas.jar

mini-j2ee.jar

log4j-core.jar

and I still keep getting the error from the compiler. I just would like to

know what I have to do to install this driver correctly for the compiler to

find its packages.

Below are the instructions the comes with the help to install JayBird, but I

think that I did everything and it still didn't work:

======================================================================

The classes from firebirdsql.jar must be in the classpath of the Java

application being compiled, or otherwise made available to your application.

The classes from the following packages must also be available:

mini-concurrent.jar

jaas.jar (included in jdk 1.4)

mini-j2ee.jar (now including JDBC classes)

log4j-core.jar (if you want logging available)

The firebirdsql-full.jar file has all of the needed files in one

archive for ease of use.

These archives are included in the binary package.

======================================================================

Please can someone help me?

Thank you...

Marcos

[1902 byte] By [MarcosAntonioPS] at [2007-9-30 21:35:01]
# 1
You should include the jar files in the classpath.
BIJ001 at 2007-7-7 3:06:05 > top of Java-index,Administration Tools,Sun Connection...
# 2
Can you give me an example how I should write the classpath with those jar files, because I did it before but I think I didn't do it the right way?Marcos
MarcosAntonioPS at 2007-7-7 3:06:06 > top of Java-index,Administration Tools,Sun Connection...
# 3
I will tell you how.. First lets say the JDBC driver is in c:\JDBCDriver\Driver.jar. Your code is in c:\code.now cd c:\code. Type "javac -classpath .:c:\JDBCDriver\Driver.jar <classname>.java"Replace the directory\jar file name with your jdbc jar file and you should be good.
HornetGoon at 2007-7-7 3:06:06 > top of Java-index,Administration Tools,Sun Connection...
# 4

My file (DriverExample.java) is in the directory 'Example' and the driver files are in the directory 'Example\org\firebirdsql\jdbc'

That's what I did inside the directory 'Example'

javac -classpath org/firebirdsql/jdbc/firebirdsql.jar DriverExample.java

And that compiled ok.

Now how can I specify where the driver files are for the java.exe? Of course I tried:

java DriverExample

and it didn't work.

MarcosAntonioPS at 2007-7-7 3:06:06 > top of Java-index,Administration Tools,Sun Connection...
# 5
To run the program you need to add the information in the classpath again!here is an example: java -classpath org/firebirdsql/jdbc/firebirdsql.jar:. DriverExample Now it will load the firebirdsql jdbc driver and your program! Enjoy and goodluck.Paul
HornetGoon at 2007-7-7 3:06:06 > top of Java-index,Administration Tools,Sun Connection...