开发者

ClassNotFoundException

开发者 https://www.devze.com 2022-12-10 08:21 出处:网络
I\'m getting the following error when I try to run a Java class which interacts with Java DB. I try loading driver with :

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

0

精彩评论

暂无评论...
验证码 换一张
取 消