Forums Register Login

Loading drivers

+Pie Number of slices to send: Send
I've done all I could to try and correct this error, but I'm out of ideas at the moment.
Anyhow, yesterday I created a simple application that inserted some test data into a MySQL database. It was in Netbeans's \sampledir\ directory. Today I have a project that is in a different directory ( I mounted it in Netbeans and it is also my CLASSPATH ). I tried to load the MySQL driver by using the following:

I get an error saying the class was not found, even though I have it in \lib\ext\.
This probably has a ridiculously easy solution, but it's just not coming to me.
Any help is appreciated, once again.
// :: Peyton
[ February 08, 2004: Message edited by: Peyton McCullough ]
+Pie Number of slices to send: Send
Moving to JDBC.
+Pie Number of slices to send: Send
Also, my CLASSPATH is C:\MARKET and I have the mySQL driver in C:\MARKET\org\gjt\mm\mysql as well, yet it gives me 'NoDefClassError' now.
+Pie Number of slices to send: Send
I've used Forte for Java but not Netbeans, so I'm not sure about the specifics for setting up the Classpath.
What you will find is that IDEs ignore the system classpath and allow each application being developed within the IDE to have its own classpath that is defined within the IDE itself. You're right that the lib/ext should have done the trick, maybe you're putting it in the wrong one. Can you be sure of which version Netbeans is running? I'm just thinking it may be shipped with its own JDK so you'll need to drop the JAR there instead.
I'd have a look at the netbeans documentation for instructions setting the Classpath for applications. You may need to look at the properties for that application like you need to do in other IDEs.
Not quite an answer, but get back to us if you get any further.
Dave.
+Pie Number of slices to send: Send
I'm using the NetBeans version that comes in a bumdle with the 1.4.2 SDK. Sometimes it will compile in NetBeans, but when I try to run it via 'cmd' ( 'java server1' ) I get the error.
Thanks for your interest in the subject, I'll look forward to your next reply.
+Pie Number of slices to send: Send
The netbeans FAQ has the question How do I add a JAR file in my CLASSPATH in Forte? that sounds similar. Is this what you are looking for?
+Pie Number of slices to send: Send
Aha!
I figured out the problem. I was using the 'java.exe' I obtained from http://java.com rather than the 'java.exe' located within the SDK. Apparently it makes a difference.
Many thanks for your post though!
Also, thanks for the NetBeans link. That may also prove useful. I'll bookmark it.
[ February 08, 2004: Message edited by: Peyton McCullough ]
This tiny ad is guaranteed to be gluten free.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 832 times.
Similar Threads
java with mysql
MySQL Error
[CentOS 5.5] MySQL stop gives access denied error
I'd like a second opinion
Slackware & Mysql error install
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:35:48.