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 us开发者_运维百科ing NetBeans IDE 6.0.
Could anyone help me to solve this problem?
Make sure you added derby.jar
to the classpath.
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
精彩评论