J
Joe Emenaker
I'm writing a Java app in Eclipse. It uses some third-party jars,
which I have in my Eclipse workspace.
When I export my jar, Eclipse packs all of my class files AND all of
the jars I'm using into my exported jar. Okay... great.
However, when I try to run the jar after that, I get
NoClassDefFoundError's when it comes time to instantiate a class
that's in one of the "inner" jars.
I guess I could distribute the third-party jars separately, but then I
need to provide the user with a way to set the classpath when they run
the app (which means platform-independent "run" scripts). To get
around *that*, I guess I could unpack all of the jars into my compile
"bin/" directory with the rest of *my* stuff, but then that gets stuff
all mixed up.
Is there a way to get Eclipse to magically package a single jar which
would set the classpath to point to the jars *within* my jar (or is
that even possible with the Sun J2RE)?
If not, what's the best way that people have found to get past this
problem?
Thanks,
- Joe
which I have in my Eclipse workspace.
When I export my jar, Eclipse packs all of my class files AND all of
the jars I'm using into my exported jar. Okay... great.
However, when I try to run the jar after that, I get
NoClassDefFoundError's when it comes time to instantiate a class
that's in one of the "inner" jars.
I guess I could distribute the third-party jars separately, but then I
need to provide the user with a way to set the classpath when they run
the app (which means platform-independent "run" scripts). To get
around *that*, I guess I could unpack all of the jars into my compile
"bin/" directory with the rest of *my* stuff, but then that gets stuff
all mixed up.
Is there a way to get Eclipse to magically package a single jar which
would set the classpath to point to the jars *within* my jar (or is
that even possible with the Sun J2RE)?
If not, what's the best way that people have found to get past this
problem?
Thanks,
- Joe