• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

excutable jar & manifest question

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an app that runs fine in WSAD (WebSphere) or when I call the main class file in DOS. The jar creates fine but I get a runtime exception "unable to load DB2 driver" when it runs. All the db2 class files are contained in a zip file.
I have seen many examples showing how to place Class-Path: in the manifest but they all seem to show references to another jar file. Is is possible to refer to other class files in a zip file? Would the class path reference the location of the zip file or a location in the project?
Any help would be appreciated.
 
Sheriff
Posts: 28397
100
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It wouldn't take you long to find out, by renaming X.zip (that file containing the DB2 drivers) to X.jar. And setting up the manifest to point to X.jar.
 
Harry Steinke
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hadn't thought of that. I'll give it a try.
 
Harry Steinke
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still can't get the jar to load the db2 driver.
Any other thoughts?
 
Paul Clapham
Sheriff
Posts: 28397
100
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not thoughts, but guesses.

1. Your manifest doesn't have a Class-Path entry.

2. It doesn't have a line-ending (CR/LF) at the end of the entry it does have.

3. The entry doesn't have the right name for the jar file.

4. It doesn't have the right relative path to the jar file.

5. You used backslashes instead of slashes in the relative path.

6. You forgot to rename the zip file to have the .jar extension.

7. The jar file doesn't contain the DB2 driver.

8. The jar file doesn't contain the classes for DB2 licencing.

I'm sure there's more possibilities...
 
Harry Steinke
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help.
It turns out that I didn't have the jar file in a subdirectory of the app. Once I did that it worked.
 
reply
    Bookmark Topic Watch Topic
  • New Topic