Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Nested classpath variables
Nested classpath variables [message #161180] Thu, 27 May 2004 08:59 Go to next message
Eclipse UserFriend
I am working with a SDK for a product that requires nested classpath
variables to access all of the resource bundles. Here is the beginning of
the classpath that works from the command line.

set AppHome=c:\app
%AppHome%\SDK;%AppHome%\SDK\bin;%AppHome%\SDK\lib\app.jar;%A ppHome%\lib;%AppHome%\SDK\etc\log4j;

I have created Classpath Variables in Eclipse for each of the directories.
However whenever I put 2 variables that start with %AppHome\SDK in the
Library list Eclipse greys out the OK button and complains about not being
able to nest one library inside another.

Does anyone know of a way to reproduce the classpath that works from the
command line in Eclipse 2.1.2?

Thanks for taking the time to read my post!
Timothy Vogel
Re: Nested classpath variables [message #161403 is a reply to message #161180] Thu, 27 May 2004 16:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

> I have created Classpath Variables in Eclipse for each of the directories.
> However whenever I put 2 variables that start with %AppHome\SDK in the
> Library list Eclipse greys out the OK button and complains about not being
> able to nest one library inside another.

classpath dirs should be not overlapped.
Re: Nested classpath variables [message #161411 is a reply to message #161403] Thu, 27 May 2004 15:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: timothy.vogel.yum.com

Sam,
Thanks for confirming that Eclipse is performing as designed. Is there
any way to duplicate the functionality from the command line?



Sam Mesh wrote:

> > I have created Classpath Variables in Eclipse for each of the directories.
> > However whenever I put 2 variables that start with %AppHomeSDK in the
> > Library list Eclipse greys out the OK button and complains about not being
> > able to nest one library inside another.

> classpath dirs should be not overlapped.
Re: Nested classpath variables [message #161454 is a reply to message #161411] Thu, 27 May 2004 18:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

Timothy Vogel wrote:
> Thanks for confirming that Eclipse is performing as designed. Is there
> any way to duplicate the functionality from the command line?

*duplicate the functionality from the command line* do you mean
something like the following in .classpath file?

> <classpathentry exported="true" kind="var" path="AppHome/classes1"/>
> <classpathentry exported="true" kind="var" path="AppHome/classes2"/>


--
Sam Mesh - http://openrules.com
Re: Nested classpath variables [message #161461 is a reply to message #161454] Thu, 27 May 2004 19:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: timothy.vogel.yum.com

Sam,
The entries would be more like:
<classpathentry kind="var" path="BP8_SDK"/>
<classpathentry kind="var" path="BP8_SDK/bin"/>
<classpathentry kind="var" path="BP8_LIB"/>
<classpathentry kind="var" path="BP8_SDK/etc/log4j"/>

but this produces the same error :
Invalid classpath in 'app/.classpath' file: Cannot nest 'C:Program
Files/App/SDK/bin' inside library 'C:Program Files/App/SDK'.
Timothy


Sam Mesh wrote:

> Timothy Vogel wrote:
> > Thanks for confirming that Eclipse is performing as designed. Is there
> > any way to duplicate the functionality from the command line?

> *duplicate the functionality from the command line* do you mean
> something like the following in .classpath file?

> > <classpathentry exported="true" kind="var" path="AppHome/classes1"/>
> > <classpathentry exported="true" kind="var" path="AppHome/classes2"/>


> --
> Sam Mesh - http://openrules.com
Re: Nested classpath variables [message #161653 is a reply to message #161461] Fri, 28 May 2004 09:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Timothy Vogel wrote:
> Sam,
> The entries would be more like:
> <classpathentry kind="var" path="BP8_SDK"/>
> <classpathentry kind="var" path="BP8_SDK/bin"/>
> <classpathentry kind="var" path="BP8_LIB"/>
> <classpathentry kind="var" path="BP8_SDK/etc/log4j"/>
>
> but this produces the same error :
> Invalid classpath in 'app/.classpath' file: Cannot nest 'C:Program
> Files/App/SDK/bin' inside library 'C:Program Files/App/SDK'.

If I think about what the above is trying to do, it doesn't make much
sense to try to do it. By including BP8_SDK, everything in BP8_SDK/bin
is already included - why would it need to be included again?
Is there content that is rooted in BP8_SDK that must be included in the
classpath, as well as content that is rooted in BP8_SDK/bin that must be
included? If so, why are they rooted at different levels like that? At
the very least I would say that such a structure is very unorthodox;
some would say it is just plain wrong.
What I might expect is something like:

BP8_SDK/
lib/
classes/
com/
company/
bp8/
...
bin/


where both BP8_SDK/classes and BP8_SDK/bin need to be on the classpath.
That is more typical and logical.

HTH,
Eric
Re: Nested classpath variables [message #161869 is a reply to message #161653] Sat, 29 May 2004 07:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: timothy.vogel.yum.com

Eric,
Thanks for the reply!

Unfortunately the SDK I am using DOES have content rooted at different
positions within the same directory structure. The vendor does not
provide source and is not "receptive" to changing the way it is setup.

Can you think of any workarounds?
Tim



Eric Rizzo wrote:
> Timothy Vogel wrote:
> > Sam,
> > The entries would be more like:
> > <classpathentry kind="var" path="BP8_SDK"/>
> > <classpathentry kind="var" path="BP8_SDK/bin"/>
> > <classpathentry kind="var" path="BP8_LIB"/>
> > <classpathentry kind="var" path="BP8_SDK/etc/log4j"/>
> >
> > but this produces the same error :
> > Invalid classpath in 'app/.classpath' file: Cannot nest 'C:Program
> > Files/App/SDK/bin' inside library 'C:Program Files/App/SDK'.

> If I think about what the above is trying to do, it doesn't make much
> sense to try to do it. By including BP8_SDK, everything in BP8_SDK/bin
> is already included - why would it need to be included again?
> Is there content that is rooted in BP8_SDK that must be included in the
> classpath, as well as content that is rooted in BP8_SDK/bin that must be
> included? If so, why are they rooted at different levels like that? At
> the very least I would say that such a structure is very unorthodox;
> some would say it is just plain wrong.
> What I might expect is something like:

> BP8_SDK/
> lib/
> classes/
> com/
> company/
> bp8/
> ...
> bin/


> where both BP8_SDK/classes and BP8_SDK/bin need to be on the classpath.
> That is more typical and logical.

> HTH,
> Eric
Re: Nested classpath variables [message #161942 is a reply to message #161869] Sat, 29 May 2004 23:25 Go to previous message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

Timothy Vogel wrote:
> Can you think of any workarounds?

<classpathentry kind="var" path="BP8_SDK" excluding="bin/" />
<classpathentry kind="var" path="BP8_SDK/bin" />

Works in M9 for sourcepath only - file an enchancement request. :)

> Unfortunately the SDK I am using DOES have content rooted at different
> positions within the same directory structure. The vendor does not
> provide source and is not "receptive" to changing the way it is setup.

BTW, *BP* means *business process*? I always knew this is a mess. :)

--
Sam Mesh - http://openrules.com
Previous Topic:source line info
Next Topic:Latest Drop I20040529: Eclipse Updatesite Not Found
Goto Forum:
  


Current Time: Fri Jul 18 11:26:04 EDT 2025

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

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

Back to the top