This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Loading drivers

 
Peyton McCullough
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to JDBC.
 
Peyton McCullough
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Peyton McCullough
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Peyton McCullough
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic