views:

91

answers:

2

I'm getting the following error when I try to run a Java class which interacts with Java DB.

I try loading driver with :

Class.forName("org.apache.derby.jdbc.EmbeddedDriver");

In libraries, "derby.jar" do exist. I'm using NetBeans IDE 6.0.

Could anyone help me to solve this problem?

+2  A: 

Make sure you added derby.jar to the classpath.

Darin Dimitrov
A: 

First, open the jar (with winrar or similar app) to make sure that the class is actually there, under the correct path !

If it is, then, my friend, you have a classpath issue - add the jar location to the project's classpath - usually you can see the classpath used where running the program in the log/ouput pane so you can make sure it's included.

Good luck ! Danny

Dan Erez