Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Moving Eclipse project and external JARs
Moving Eclipse project and external JARs [message #156888] Sat, 01 May 2004 08:45 Go to next message
Eclipse UserFriend
Originally posted by: john.rmts.donpac.ru

Hi,

I need external JARs (wich placed in lib subdirectory of my project or
in Eclipse plugins subdirectory) to compile my project. And I need work
on my project on different computers with different OSes and absolute
paths. But in project Properties -> Java Build Path -> Libraries I can
add external JARs only with absolute paths through File Open dialog. How
can I add external JARs with relative paths?

I tried to write to .classpath:
<classpathentry kind="lib" path="lib/junit.jar"/>

But Eclipse can't understand this and can't compile my project

I use Eclipse Platform Version: 2.1.2 Build id: 200311030802
Re: Moving Eclipse project and external JARs [message #157046 is a reply to message #156888] Mon, 03 May 2004 16:01 Go to previous message
Dave Carlson is currently offline Dave CarlsonFriend
Messages: 402
Registered: July 2009
Senior Member
Eugene,
If your library JARs are in a "lib" subdirectory of your project (or, in
fact, any project in your workspace), you should use the "Add JARs..."
button instead of the "Add External JARs..." button. When adding JARs, the
path is relative to your workspace project location and not absolute. This
should work across different computers and different OSs.

Only use External JARs when the libraries are outside of your workspace.
Even then, it's best to define and use classpath variables to avoid absolute
paths.

Regards,
Dave Carlson

"Eugene Prokopiev" <john@rmts.donpac.ru> wrote in message
news:c6vnig$t47$1@eclipse.org...
> Hi,
>
> I need external JARs (wich placed in lib subdirectory of my project or
> in Eclipse plugins subdirectory) to compile my project. And I need work
> on my project on different computers with different OSes and absolute
> paths. But in project Properties -> Java Build Path -> Libraries I can
> add external JARs only with absolute paths through File Open dialog. How
> can I add external JARs with relative paths?
>
> I tried to write to .classpath:
> <classpathentry kind="lib" path="lib/junit.jar"/>
>
> But Eclipse can't understand this and can't compile my project
>
> I use Eclipse Platform Version: 2.1.2 Build id: 200311030802
>
Previous Topic:New JUnit Test Case Wizard
Next Topic:IResourceChangeListener and SearchEngine problem
Goto Forum:
  


Current Time: Sat Jul 27 16:49:43 GMT 2024

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

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

Back to the top