File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Executable jar app doesn't find Driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Executable jar app doesn Watch "Executable jar app doesn New topic

Executable jar app doesn't find Driver

juliane gross
Ranch Hand

Joined: May 30, 2002
Posts: 161
I built an application with embedded Derby (cloudscape) database.
It runs fine as long as I don't try to make a executable JAR file.
Then I get this error message:
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver

(The program parts which don't use the database still run fine).
Derby (cloudscape) needs the derby.jar to find its EmbeddedDriver.

How can I tell my jar'ed app where to find the Driver? Do I have to
put derby.jar in a special place in my app's jar file structure?
Or redo my classpath somehow? (But why, if derby.jar is found by
my app in a not-jar'ed way?)

I am very glad about any tips and help,
thank you!
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

That's a jar-question, not a jdbc-Question.
And it's answered over and over again. (search beginners or intermediate: jar)
juliane gross
Ranch Hand

Joined: May 30, 2002
Posts: 161
thank you, Stefan.

For anybody else having this problem:
I found the answer in the Java advanced forum


it was a problem with the manifest file.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33117

I'm glad you found the answer. I'm going to move this over to Java In General so people searching can find it better.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Executable jar app doesn't find Driver
It's not a secret anymore!