Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How can I tell Eclipse to not include other jars on a jar dependency's classpath?
How can I tell Eclipse to not include other jars on a jar dependency's classpath? [message #762031] Wed, 07 December 2011 13:04 Go to next message
J.-P. Pellet is currently offline J.-P. PelletFriend
Messages: 71
Registered: July 2009
Member
I have the following setup:

/mylibs/a.jar
/mylibs/b.jar

and an Eclipse project that should have a.jar on its classpath for
building. Unfortunately — something that I cannot change — a.jar has a
manifest with an entry like this:

Class-Path: b.jar

so Eclipse also automatically adds b.jar in the list of referenced
libraries — except I don't want it.

How can I prevent Eclipse to add b.jar from being added to the list of
libraries?

TIA,
J.-P.
Re: How can I tell Eclipse to not include other jars on a jar dependency's classpath? [message #762037 is a reply to message #762031] Wed, 07 December 2011 13:12 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You can set an extra classpath inside your build.properties

jars.extra.classpath=

Tom

Am 07.12.11 14:04, schrieb J.-P. Pellet:
> I have the following setup:
>
> /mylibs/a.jar
> /mylibs/b.jar
>
> and an Eclipse project that should have a.jar on its classpath for
> building. Unfortunately — something that I cannot change — a.jar has a
> manifest with an entry like this:
>
> Class-Path: b.jar
>
> so Eclipse also automatically adds b.jar in the list of referenced
> libraries — except I don't want it.
>
> How can I prevent Eclipse to add b.jar from being added to the list of
> libraries?
>
> TIA,
> J.-P.
Re: How can I tell Eclipse to not include other jars on a jar dependency's classpath? [message #762041 is a reply to message #762037] Wed, 07 December 2011 13:17 Go to previous messageGo to next message
J.-P. Pellet is currently offline J.-P. PelletFriend
Messages: 71
Registered: July 2009
Member
Hi Tom,

Thanks for your answer. I think I'm missing something here… How can
setting the extra classpath remove b.jar from the list of referenced
libraries?

Cheers,
J.-P.

On 07.12.11 14:12, Tom Schindl wrote:
> You can set an extra classpath inside your build.properties
>
> jars.extra.classpath=
>
> Tom
Re: How can I tell Eclipse to not include other jars on a jar dependency's classpath? [message #762046 is a reply to message #762041] Wed, 07 December 2011 13:26 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Am 07.12.11 14:17, schrieb J.-P. Pellet:
> Hi Tom,
>
> Thanks for your answer. I think I'm missing something here… How can
> setting the extra classpath remove b.jar from the list of referenced
> libraries?

Ah you are talking about a JDT project - then my message makes no sense.

Tom
Re: How can I tell Eclipse to not include other jars on a jar dependency's classpath? [message #762064 is a reply to message #762031] Wed, 07 December 2011 13:50 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 07.12.2011 14:04, J.-P. Pellet wrote:
> I have the following setup:
>
> /mylibs/a.jar
> /mylibs/b.jar
>
> and an Eclipse project that should have a.jar on its classpath for
> building. Unfortunately — something that I cannot change — a.jar has a
> manifest with an entry like this:
>
> Class-Path: b.jar
>
> so Eclipse also automatically adds b.jar in the list of referenced
> libraries — except I don't want it.
>
> How can I prevent Eclipse to add b.jar from being added to the list of
> libraries?
Create a User Library with 'a.jar' in it. We don't resolve referenced
libraries for those.

Dani
>
> TIA,
> J.-P.
Re: How can I tell Eclipse to not include other jars on a jar dependency's classpath? [message #762070 is a reply to message #762064] Wed, 07 December 2011 14:00 Go to previous message
J.-P. Pellet is currently offline J.-P. PelletFriend
Messages: 71
Registered: July 2009
Member
>> How can I prevent Eclipse to add b.jar from being added to the list of
>> libraries?
> Create a User Library with 'a.jar' in it. We don't resolve referenced
> libraries for those.

Thanks a lot!

Best,
J.-P.
Previous Topic:QuickFixProcessor performance (profiling)
Next Topic:Help with Java code formatter
Goto Forum:
  


Current Time: Thu Apr 25 00:50:32 GMT 2024

Powered by FUDForum. Page generated in 0.03659 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top