Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » configuring build path with system variables
configuring build path with system variables [message #172409] Mon, 25 September 2006 08:44 Go to next message
Eclipse UserFriend
Originally posted by: smastrella.sogei.it

I've configured my eclipse workspace on an external usb drive, sometimes I
need to use this workspace on different Windows system but ther could be
the possibility of a different drive letter so I need to change all the
build path.
I've thougth to create a new variable on the eclipse environment pointing
over the letter of the usb drive (i.e. EXTERNAL_DRIVE = G:/), and then add
a number of variable for all the libraries linking EXTERNAL_DRIVE with the
remaining part of the path (i.e. COMMONS_SOMETHING =
EXTERNAL_DRIVE/commons_something).
Unfortunately I can't find the way to tell Eclipse to link the two part of
the path, I've tried with the symbol "$" or the "%" with no result.

Is there anybody with the solution?

Thanks anyway.
Re: configuring build path with system variables [message #172425 is a reply to message #172409] Mon, 25 September 2006 09:57 Go to previous messageGo to next message
Asaf Yaffe is currently offline Asaf YaffeFriend
Messages: 333
Registered: July 2009
Senior Member
Stefano wrote:
> I've configured my eclipse workspace on an external usb drive, sometimes
> I need to use this workspace on different Windows system but ther could
> be the possibility of a different drive letter so I need to change all
> the build path.
> I've thougth to create a new variable on the eclipse environment
> pointing over the letter of the usb drive (i.e. EXTERNAL_DRIVE = G:/),
> and then add a number of variable for all the libraries linking
> EXTERNAL_DRIVE with the remaining part of the path (i.e.
> COMMONS_SOMETHING = EXTERNAL_DRIVE/commons_something).
> Unfortunately I can't find the way to tell Eclipse to link the two part
> of the path, I've tried with the symbol "$" or the "%" with no result.
>
> Is there anybody with the solution?
>
> Thanks anyway.
>

I am not sure this answers your question, but if the entire Eclipse
workspace is located on the USB drive, you can launch Eclipse with the
-data command line option to specify the workspace location in which
Eclipse starts.
For example, if your USB drive is mapped to drive X, use eclipse.exe
-data X:\MyWorkspace.

Alternatively, launch Eclipse without any command line options, and use
the "File | Switch Workspace..." menu command to point Eclipse to the
workspace on the USB drive.

HTH,
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
Re: configuring build path with system variables [message #172438 is a reply to message #172425] Mon, 25 September 2006 12:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smastrella.sogei.it

Asaf Yaffe wrote:

> Stefano wrote:
>> I've configured my eclipse workspace on an external usb drive, sometimes
>> I need to use this workspace on different Windows system but ther could
>> be the possibility of a different drive letter so I need to change all
>> the build path.
>> I've thougth to create a new variable on the eclipse environment
>> pointing over the letter of the usb drive (i.e. EXTERNAL_DRIVE = G:/),
>> and then add a number of variable for all the libraries linking
>> EXTERNAL_DRIVE with the remaining part of the path (i.e.
>> COMMONS_SOMETHING = EXTERNAL_DRIVE/commons_something).
>> Unfortunately I can't find the way to tell Eclipse to link the two part
>> of the path, I've tried with the symbol "$" or the "%" with no result.
>>
>> Is there anybody with the solution?
>>
>> Thanks anyway.
>>

> I am not sure this answers your question, but if the entire Eclipse
> workspace is located on the USB drive, you can launch Eclipse with the
> -data command line option to specify the workspace location in which
> Eclipse starts.
> For example, if your USB drive is mapped to drive X, use eclipse.exe
> -data X:MyWorkspace.

> Alternatively, launch Eclipse without any command line options, and use
> the "File | Switch Workspace..." menu command to point Eclipse to the
> workspace on the USB drive.

> HTH,
> Asaf

The workspace is already on the USB drive, but its addressing is made via
an absolute path, if the external drive is addressed with another drive
letter eclipse can't resolve all the elements in the build path (they are
also on the drive).
With a variable to point to the root of the usb drive I can manage all the
changing of the letter with a change of the value of the variable. The
problem is to tell eclipse to link two strings to compose the absolute
path of the external libraries.
Re: configuring build path with system variables [message #172639 is a reply to message #172438] Wed, 27 September 2006 00:36 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse4.rizzoweb.com

Stefano wrote:
> The workspace is already on the USB drive, but its addressing is made
> via an absolute path, if the external drive is addressed with another
> drive letter eclipse can't resolve all the elements in the build path
> (they are also on the drive).
> With a variable to point to the root of the usb drive I can manage all
> the changing of the letter with a change of the value of the variable.
> The problem is to tell eclipse to link two strings to compose the
> absolute path of the external libraries.

I think the point he was trying to make is that you can keep your
workspace clean of any absolute paths, use relative paths only. And you
can set up Eclipse to either prompt you every time for the workspace
location, or set up a little batch file that specifies the -data
parameter (and just edit that when the drive letter changes).

--
Hope this helps,
Eric
Previous Topic:strategies for editing external source
Next Topic:Eclipse 3.2 for solaris sparc crash at startup
Goto Forum:
  


Current Time: Thu Sep 26 19:05:31 GMT 2024

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

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

Back to the top