File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Classpath issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Classpath issue" Watch "Classpath issue" New topic

Classpath issue

Dominic Steng�rd
Ranch Hand

Joined: Feb 05, 2001
Posts: 186
Hey JavaGurus,

Ive packaged my POJO application in a JAR file together with its third party libraries such as Log4j.

The structure of the executable jar file is as follows:

The issue Im having is that when I execute

I get the following error:

Seems as if cannot find my log4j.jar files.
So the question is:
How do I set the classpath to refer to a library jar file (log4j.jar) that is contained in another jar file?

Thanks in advance!

Kind regards

Dominic Steng�rd<br />Sun Certified Java 2 Programmer
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

You can't nest .jar files. I was going to try:


but I haven't tried it yet.
I agree. Here's the link:
subject: Classpath issue
It's not a secret anymore!