Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ClassPath problem: cannot find org.apache.derby.jdbc in derby.jar

 
Marcus Reese
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is my first time to post to any java forum.

The following is in my WindowsXP ClassPath:
;C:\"Program Files"\Java\jdk1.6.0_01\db\lib\derby.jar;C:\"Program Files"\Java\jdk1.6.0_01
Using a similar entry in ClassPath I have had no trouble using the normal jdk class library.
But when I try:

I get a ClassNotFoundException for org.apache.derby.jdbc.EmbeddedDriver.
And when I try:

I get "package org.apache.derby.jdbc does not exist"

I opened NetBeans, and it was able to load the driver and create a database no problem, so why can't I do it using a text editor and JDK? (I don't know how to use NetBeans really, and so I looked in vain for a code sample in Main. The database loading code must be in the APP Schema, wherever that is?)

Thanks for your consideration!
 
Moiez Gohar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is your development/working directory? ie, in which directory are your source files placed. make sure that the working directory has the derby.jar file in the folder: [working_directory]/org/apache/...
if it is not, then place it in this directory
 
Marcus Reese
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That worked--Thank you so much!
 
Moiez Gohar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are welcome!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic