Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Relative Classpath Variables
Relative Classpath Variables [message #128933] Sat, 20 December 2003 13:55 Go to next message
Eclipse UserFriend
Originally posted by: mykel.weirdness.com

I know this was visited once or twice, but it's suddenly become a real
issue for me and I can't seem to solve it via the docs.

I swap between a Linux/GTK install of Eclipse and a Windows install.
Since I'm the only developer I mount the workspace on a shared drive and
just point each installation to the workspace.

The problem is that I have about 75 classpath variables defining a
multitude of things like COMM_LOGGING that points to the ASF
commons-logging jars, etc.

When I switch from one OS to the other, I have to redefine each of these
variables since it's /mnt/blah/commons-logging/commons-logging.jar on one
and V:\diskblah\commons-logging\commons-logging.jar on the other. Eclipse
handles the path seperator, but clearly not the mount point prefix.

Is there some way to make classpath variables relative to the workspace?

All 40 or so of my shared libraries (and their attendant docs and sources)
are easily accessible from the workspace directory (as ../xxxx) but that
won't work inside a classpath variable for some (very good, I'm sure)
reason.

What I'd like to do is define COMM_LOGGING as
"../../commons-logging/commons-logging.jar" and have it work when I switch
from Linux (where my code must run) back to that other OS whose SWT UI
works SO much better and I can actually print from.
Re: Relative Classpath Variables [message #131327 is a reply to message #128933] Mon, 05 January 2004 06:40 Go to previous messageGo to next message
Eclipse UserFriend
Assuming all your jars are in 'commons-logging', you shoul define one
classpath variable 'COMMON_LOGGING' which would have the
'/mnt/blah/commons-logging' value on Linux and the
'V:\diskblah\commons-logging' value on Windows. Then extend it (use the
'Extend...' button in the 'New Variable Classpath Entry' dialog) with each
jar.

Jerome

"Mykel Alvis" <mykel@weirdness.com> wrote in message
news:bs25ut$m19$1@eclipse.org...
> I know this was visited once or twice, but it's suddenly become a real
> issue for me and I can't seem to solve it via the docs.
>
> I swap between a Linux/GTK install of Eclipse and a Windows install.
> Since I'm the only developer I mount the workspace on a shared drive and
> just point each installation to the workspace.
>
> The problem is that I have about 75 classpath variables defining a
> multitude of things like COMM_LOGGING that points to the ASF
> commons-logging jars, etc.
>
> When I switch from one OS to the other, I have to redefine each of these
> variables since it's /mnt/blah/commons-logging/commons-logging.jar on one
> and V:\diskblah\commons-logging\commons-logging.jar on the other. Eclipse
> handles the path seperator, but clearly not the mount point prefix.
>
> Is there some way to make classpath variables relative to the workspace?
>
> All 40 or so of my shared libraries (and their attendant docs and sources)
> are easily accessible from the workspace directory (as ../xxxx) but that
> won't work inside a classpath variable for some (very good, I'm sure)
> reason.
>
> What I'd like to do is define COMM_LOGGING as
> "../../commons-logging/commons-logging.jar" and have it work when I switch
> from Linux (where my code must run) back to that other OS whose SWT UI
> works SO much better and I can actually print from.
>
>
>
Re: Relative Classpath Variables [message #131637 is a reply to message #131327] Mon, 05 January 2004 14:08 Go to previous message
Eclipse UserFriend
Originally posted by: meshcheryakovsemen.hotmail.com

(Not sure but hope:) 3.X will be mature in the following areas:
- virtual file system (as in Borland?)
- macro expansion (as in Ant?)

If so, you'll be able to write ${WORKSPACE}/${COMMONS}/...

Best regards,
-- Sam
It's better to view source code than comments to it.
Previous Topic:Shell environment variables
Next Topic:Eclipse debugger not working
Goto Forum:
  


Current Time: Sun Jun 01 10:04:23 EDT 2025

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

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

Back to the top