Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » External jars - plugin
External jars - plugin [message #179679] Tue, 28 September 2004 01:08 Go to next message
Eclipse UserFriend
Originally posted by: arthur.deltacore.com.br

Hello,

I'm making a class-generator plugin, and the classes generated by the
plugin depend on a external jar (DOM4J). I've included it in the build
output (the generated classes are in the org.foo package, and the jar is
at org/foo/lib). However, when the classes are generated, they simply
don´t recognize the dom4j import; I have to manually import the external
jar into the project build path. Is there a way to automatically do this
when the plugin generate the classes?


Regards,

Arthur Casals
Re: External jars - plugin [message #179747 is a reply to message #179679] Tue, 28 September 2004 10:14 Go to previous messageGo to next message
Markus KellerFriend
Messages: 294
Registered: July 2009
Senior Member
Arthur Casals wrote:

> Hello,
>
> I'm making a class-generator plugin, and the classes generated by the
> plugin depend on a external jar (DOM4J). I've included it in the build
> output (the generated classes are in the org.foo package, and the jar is
> at org/foo/lib). However, when the classes are generated, they simply
> don´t recognize the dom4j import; I have to manually import the external
> jar into the project build path. Is there a way to automatically do this
> when the plugin generate the classes?

Use IJavaProject#getRawClasspath() and #setRawClasspath(..) to modify a
project's classpath. You can create new classpath entries with
JavaCore.newLibraryEntry(..).

HTH
Markus
Re: External jars - plugin [message #179846 is a reply to message #179747] Tue, 28 September 2004 15:09 Go to previous message
Eclipse UserFriend
Originally posted by: arthur.deltacore.com.br

Markus Keller wrote:
> Arthur Casals wrote:
>
>> Hello,
>>
>> I'm making a class-generator plugin, and the classes generated by the
>> plugin depend on a external jar (DOM4J). I've included it in the build
>> output (the generated classes are in the org.foo package, and the jar
>> is at org/foo/lib). However, when the classes are generated, they
>> simply don´t recognize the dom4j import; I have to manually import the
>> external jar into the project build path. Is there a way to
>> automatically do this when the plugin generate the classes?
>
>
> Use IJavaProject#getRawClasspath() and #setRawClasspath(..) to modify a
> project's classpath. You can create new classpath entries with
> JavaCore.newLibraryEntry(..).
>
> HTH
> Markus

Great, problem solved. Thanks a lot.

Arthur Casals
Previous Topic:Newbie question
Next Topic:java/eclipse debugger hangs on Mdk 10.1 CE
Goto Forum:
  


Current Time: Mon Jul 22 23:14:11 GMT 2024

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

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

Back to the top