0

I am building an app in Java, using Eclipse and Derby as DataBase. I have aready added Derby Client to my project and everything goes perfect.

My problem is that when I run my app from the CMD or comand line; I get the error message: Not suitable driver found for jdbc:derby://localhost:1527/...

How can this be solved?

Thanks before hand!

1 Answers1

0
  1. Firstly, just to make sure you already have Derby jdbc driver in your classpath. You can check for its versions and download here

  2. Secondly, when you run your app from CMD, make sure you specify the classpath which should include your Derby jdbc driver. You can follow the guide here which mentioned:

You have two options:

1.include all jar files from the lib directory into the manifest (you can use relative paths there)

2.Specify everything (including your jar) on the commandline using -cp: java -cp MyJar.jar:lib/* com.somepackage.subpackage.Main

Community
  • 1
  • 1
NangSaigon
  • 1,253
  • 12
  • 14