JDBC installation -please help

I have just started installing msql and I want to access it using JDBC.
I have tried to connect but I got class not found error and according to http://www.imaginary.com/Java/mSQL-JDBC/FAQ.html#install
it is a CLASSPATH problem. Can somebody help me with the installation before I get fed up and forget it.

What I have done is:
-download msql-JDBC from imaginary and put it under jdk1.1/lib
-the CLASSPATH, I am not really sure cause the above site uses unix
which I am not familiar with.

This is my CLASSPATH now

Are there anything else needed ? or any mistakes ?

after compiling the and then run the test code in the above site and get  
"can't find class Select" error

I appreciate any help.

Who is Participating?
dorothy2Connect With a Mentor Commented:
I downloaded the file and looked at it from WinZip. You need to:

(1) extract the zip file;
(2) put the jar file(s) in your classpath;
(3) compile select.java. The source code select.java does not reference a java package, however the file is located in a subdirectory called examples. I believe that's why you can't find it. Make sure the directory where select.class ends up is in your classpath.
(4) I didn't read the section on database setup carefully, but it looks like you need to run an sql script to get access to the tables.

BTW - ':' is used to concatenate the string of Unix class paths, ';' is used for Windows environment.

Good luck!

I will assume u are working on windows

try changng the classpath to


NOTE the ';' instead of ':' used.
jean11Author Commented:
Yes I am working under windows 98 and NT.
How do you set the classpath in NT please.
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

go to 'My Computer' on your desktop and right click on it.
select 'Properties'.

there should be a Environments tab.
click on it.

add your classpath.

alternatively, go to DOS prompt and type
set CLASSPATH=c:\jdk1.1.8\lib\msql-jdbc-1.zip;c:\jdk1.1.8\lib\classes.zip

if setting classpath still fails, see whether u have a 'ext' directory
in c:\jdk1.1.8\lib and copy the 2 zip files into that directory.

jean11Author Commented:
Ok I managed to set the classpath in the NT machine and set the classpath in the 98 one but I still gert the same error:
can't find class
jean11Author Commented:
>if setting classpath still fails, see whether u >have a 'ext' directory  in c:\jdk1.1.8\lib and copy >the 2 zip files into that directory.

Yes they are there both the
mSQL-JDBC-1.zip  and classes.zip under c:\jdk1.1.8\lib
"can't find class Select" error

I assume u have a Select.java
u need to include the path to Select.java in the classpath as well.
eg. if Select.java is in c:\projects then include
c:\projects in classpath

jean11Author Commented:
>I assume u have a Select.java
Of course I have the test program as mentioned in

and run it as described in the same site
java Select jdbc:msql://localhost:1114/test

test: the database name.

but nothing happend. Even if the database server is not running it does the same thing. It executes
and return to the C:\  prompt as follows:

C:\java Select jdbc:msql://localhost:1114/test

Is that correct  ?

and what's wrong ?

Thanks alot.
For (3) - select.class is in examples.jar. So add that archive to your classpath as well. Don't worry about recompiling select.java.
All Courses

From novice to tech pro — start learning today.