Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » .classpath behavior
.classpath behavior [message #335687] Tue, 21 April 2009 19:00 Go to next message
Brian Johnson is currently offline Brian JohnsonFriend
Messages: 6
Registered: July 2009
Junior Member
I've recently run into some unexpected (at least to me) Eclipse
behavior... and am hoping someone here can shed some light on it.

If I have a classpath build variable WL_HOME set to c:\bea\wlserver_10.3
and in my classpath I have an entry like the following:

<classpathentry kind="var"
path="WL_HOME/server/lib/../../../modules/something.jar"/>

I would expect Eclipse to evaluate WL_HOME first, then follow the relative
directory structure to find c:\bea\modules\something.jar. It doesn't.
Instead it looks for "modules/something.jar", completely ignoring the
WL_HOME, apparently not expanding the variable before trying to go to the
third parent directory.

Further, if in c:\bea\wlserver_10.3\server\lib there is an api.jar, and
that api.jar contains a manifest that consists solely of entries such as:
../../../modules/something.jar, I would expect either of the following
entries in .classpath to work:

<classpathentry kind="var" path="WL_HOME/server/lib/api.jar"/>
<classpathentry kind="lib" path="C:/bea/wlserver_10.3/server/lib/api.jar"/>

But neither will actually cause Eclipse to successfully find the .jar's
referenced in the api.jar.

Why does Eclipse behave this way? Is this by design? Is the design a
product of some concept or rule I'm unfamiliar with? Is it a bug? Is the
bug known? Is it just low priority?

Thanks in advance for any info.
Re: .classpath behavior [message #335692 is a reply to message #335687] Wed, 22 April 2009 07:35 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
Brian Johnson wrote:
> I've recently run into some unexpected (at least to me) Eclipse
> behavior... and am hoping someone here can shed some light on it.
>
> If I have a classpath build variable WL_HOME set to
> c:\bea\wlserver_10.3 and in my classpath I have an entry like the
> following:
>
> <classpathentry kind="var"
> path="WL_HOME/server/lib/../../../modules/something.jar"/>
>
> I would expect Eclipse to evaluate WL_HOME first, then follow the
> relative directory structure to find c:\bea\modules\something.jar. It
> doesn't. Instead it looks for "modules/something.jar", completely
> ignoring the WL_HOME, apparently not expanding the variable before
> trying to go to the third parent directory.
>
> Further, if in c:\bea\wlserver_10.3\server\lib there is an api.jar,
> and that api.jar contains a manifest that consists solely of entries
> such as: ./../../modules/something.jar, I would expect either of the
> following entries in .classpath to work:
>
> <classpathentry kind="var" path="WL_HOME/server/lib/api.jar"/>
> <classpathentry kind="lib"
> path="C:/bea/wlserver_10.3/server/lib/api.jar"/>
>
> But neither will actually cause Eclipse to successfully find the
> .jar's referenced in the api.jar.
>
> Why does Eclipse behave this way? Is this by design? Is the design a
> product of some concept or rule I'm unfamiliar with? Is it a bug? Is
> the bug known? Is it just low priority?
If you've setup the Java build path via UI (and not by hacking the
..classpath file) and it's not working then please file a bug against JDT
UI with steps to reproduce.

Dani
>
> Thanks in advance for any info.
>
Previous Topic:Closing/Restarting an already closed workbench.
Next Topic:programmatically select/deselect ruler
Goto Forum:
  


Current Time: Sun Dec 21 18:05:48 GMT 2014

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

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