sun.jdbc.odbc.jdbcodbcdriver: How to do CLASSPATH

I want to use sun.jdbc.odbc.jdbcodbcdriver and I'm having trouble setting the CLASSPATH. I have searched high and low for instructions on how to set CLASSPATH, and can't find any. Would somebody please tell me how to set CLASSPATHs for drivers? I mean the basics... like where do you go to do it, what commands to run, how do you check to see if you've done it correctly, etc... please help. Much appreciated.

Also, is there a problem with using this in an applet? Do I need to use JSP instead? Thanks from inexperienced Java person here... also a basic beginners book recommendation that is detailed enough to get me into jsp/servlet applications would be highly appreciated as well.

You don't need the classpath for this driver since it's available in the JRE (it's in rt.jar).

For other drivers, you just need to include the .jar file that contains them in your classpath. Usually, you put these jar files in the /lib/ext directories. JAR files in this directory don't need to be added to the classpath.

If the driver isn't availble to the runtime environment (assuming you're using Class.forName(...)), then this line would throw a ClassNotFoundException.

OK... here's the deal guys. All I need to do is have a web page collect userid and password, then write userid and password to a database. Then I need to have another web page for them to log in.... check the same database for valid userid and password, then let them in to yet another web page. I'm getting the following errors: unable to resolve symbol connection, and unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown.

I know this is simple for you guys, but it's important that I have answers to this before I even read the java for dummies book. I think you're suggesting I use jsp page with a servlet? If so, what's the best way to go about it? I'm using netbeans ide 3.5.1. The thing that makes me frustrated is that when I add a jsp page, I don't get a nice GUI to work with.... if I add a jframe form from the java GUI form section, then I do get the GUI to work with. So I guess what I really need is a jump start... put me in the right direction and I'll be good to go. Simple questions, but very important.

OK... here's the deal guys. All I need to do is have a web page collect userid and password, then write userid and password to a database. Then I need to have another web page for them to log in.... check the same database for valid userid and password, then let them in to yet another web page. I'm getting the following errors: unable to resolve symbol connection, and unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown.

I know this is simple for you guys, but it's important that I have answers to this before I even read the java for dummies book. I think you're suggesting I use jsp page with a servlet? If so, what's the best way to go about it? I'm using netbeans ide 3.5.1. The thing that makes me frustrated is that when I add a jsp page, I don't get a nice GUI to work with.... if I add a jframe form from the java GUI form section, then I do get the GUI to work with. So I guess what I really need is a jump start... put me in the right direction and I'll be good to go. Simple questions, but very important.

One last thing before I go to bed. If you go to the coreservlets.com site and scroll down to the bottom of the page, the first edition of Core Servlets and Java Server Pages is available as a free pdf (yes, the whole book ;-)).

If you have a look through that, you'll get a good introduction.

When the EE developers finish tootling with the site ;-), you could try a search for "JdbcOdbcDriver" in the JSP Topic Area. You might find some JSP code that will give you a good start.

When you are using the driver :- sun.jdbc.odbc.JdbcOdbcDriver() , it means that you are using Type1 Driver ie making ur java driver is making call to the ODBC provider. There is no need to set the classpath for it. You just have to load the class for this driver thru Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").

Ofcourse ur JDK should be in the path to run ur java application.

Applet Problem:-
You cant use the Type 1 Driver in Applet as applet cant access the File System on the client.

Featured Post

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed.
------------------------- Start
The idea here is to target your cell phones with
the correct…

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…