add nested jar to build path [message #729415] |
Mon, 26 September 2011 06:54 |
labernit Messages: 1 Registered: September 2011 |
Junior Member |
|
|
Hello all,
i really searched a lot but i couldn't find an answer, so i hope you can help me
I have a standard java eclipse project (no maven / ant ,...) and i want to use an external software. This is provided as a jar file, and the respective dependencies are also bundled in that jar file. So the jar file looks like this:
/src
dep1.jar
dep2.jar
...
But if i simply add the overall jar to my buildpath, it seems like all the nested or inner jars (dep1.jar,...) are not correctly loaded.
So my question is, does eclipse load these inner / nested jars at all?
If not, what can i do
Thanks in advance
Greetings,
Martin
|
|
|
|
|
Re: add nested jar to build path [message #730373 is a reply to message #729415] |
Wed, 28 September 2011 08:52 |
Dani Megert Messages: 3802 Registered: July 2009 |
Senior Member |
|
|
On 26.09.2011 08:54, labernit wrote:
> Hello all,
>
> i really searched a lot but i couldn't find an answer, so i hope you
> can help me :)
>
> I have a standard java eclipse project (no maven / ant ,...) and i
> want to use an external software. This is provided as a jar file, and
> the respective dependencies are also bundled in that jar file. So the
> jar file looks like this:
> /src
> dep1.jar
> dep2.jar
> ..
>
> But if i simply add the overall jar to my buildpath, it seems like all
> the nested or inner jars (dep1.jar,...) are not correctly loaded.
>
> So my question is, does eclipse load these inner / nested jars at all?
> If not, what can i do :)
This is expected. Java does not handle nested JARs. You would have to
write your own class loader to do this or export your code using the
'Runnable JAR file' wizard, which adds such a class loader.
Dani
>
> Thanks in advance
>
> Greetings,
> Martin
|
|
|
Powered by
FUDForum. Page generated in 0.03560 seconds