A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
Could not execute a jar file even with proper classpath.
Joined: Nov 13, 2005
Sep 27, 2011 12:39:47
I am trying to execute a jar file which looks for a driver in another jar file.
Though I had the path in the classpath, you need to mention the class-path for the jar specifially. So, I have these lines in the manifest file,
Manifest-Version: 1.0 Class-Path: lib/db2jcc4.jar
But still, the jar file is not searched in the lib folder.
I get the following error -
By the way I am trying to use hibernate pojo generator project for which I am doing this.
Let me know if anyone has any solutions for the same.
Joined: Oct 14, 2005
Sep 27, 2011 12:58:52
Presumably, then, that "lib" folder is not in the same folder as the jar? Your file structure should look something like this:
-- -- your.jar
-- -- lib
-- -- -- db2jcc4.jar
Joined: Oct 27, 2005
Sep 28, 2011 03:47:35
And not like this, with the JAR file inside the other JAR file:
-- -- your.jar
-- -- -- lib
-- -- -- -- db2jcc4.jar
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions
How To Answer Questions
subject: Could not execute a jar file even with proper classpath.
RunJavaApplication As Executable Jar
Building a jar with dependancies.
help to includes jar files in classpath of a jar file
NoClassDefFoundError running a jar file from the command line
Running jar from anywhere
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014