• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting Classpath for Derby on OS X

 
John Longer
Greenhorn
Posts: 16
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I am facing the following problem.
Trying to get Derby DB working in Embedded mode on my Macbook, but getting the following error :

java.sql.SQLException: No suitable driver found for jdbc:derby



Seems like trouble with classpath, getting the following when running setEmbeddedCP in my terminal:



The following are contents of bash_profile


Any ideas?
Thanks


 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John Longer,

First of all, a warm welcome to CodeRanch!

John Longer wrote:Any ideas?

Did you follow the Apache Derby Tutorial? It explains all different steps: install software, configure Embedded Derby and how an application has to access a Derby database using the Embedded Derby JDBC driver.

Hope it helps!
Kind regards,
Roel
 
John Longer
Greenhorn
Posts: 16
1
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roel

Thank you.

Yes, I've read tutorial, but it is missing part for OS X.
Managed to do.
In case anybody needs it
add to bash_profile your path to JDBC installation.

In my case it was Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Home/Contents/db/lib/derby.jar.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35269
383
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John,
Have a cow for posting how you solved it. I have a blog post on how to get Derby running. I did test it on Mac.

I mention updating the class path to make it a wee less OS specific. But bash_profile is certainly more convenient. I've added that as a comment and linked to this thread.
 
John Longer
Greenhorn
Posts: 16
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Jeanne.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic