Skip to main content



      Home
Home » Newcomers » Newcomers » Eclipse Unix Windows
Eclipse Unix Windows [message #267405] Tue, 30 December 2008 05:57 Go to next message
Eclipse UserFriend
Hi,

I have eclipse project in the CVS which has .project files specific
for Windows. For eg the libraries are hardcoded to U:/lib/...


But U: is specific to windows and when the developers in the Unix
checkout the project it does not work for them. They have to manually
change the lib paths to Unix specific.


Can you suggest a common way for giving the paths for independent of
the Windows/Linux. My libraries on Windows are on U: wheresas on Linux
are /home/sbcimp/ng/lib.


Thanks in advance
Nick
Re: Eclipse Unix Windows [message #267407 is a reply to message #267405] Tue, 30 December 2008 09:27 Go to previous messageGo to next message
Eclipse UserFriend
Nick a écrit :
> Hi,
> I have eclipse project in the CVS which has .project files specific for
> Windows. For eg the libraries are hardcoded to U:/lib/...
>
> But U: is specific to windows and when the developers in the Unix
> checkout the project it does not work for them. They have to manually
> change the lib paths to Unix specific.
>
> Can you suggest a common way for giving the paths for independent of the
> Windows/Linux. My libraries on Windows are on U: wheresas on Linux are
> /home/sbcimp/ng/lib.
You might want to use a classpath variable that is defined using U:/lib/
on windows and /home/sbcimp/ng/lib on Unix.
Then you extend it for a jar contained into this folder.
This works for .classpath files. Not sure you can use the same trick for
..project files.
--
Olivier
Re: Eclipse Unix Windows [message #267411 is a reply to message #267407] Tue, 30 December 2008 09:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 12/30/2008 9:27 AM, Olivier Thomann wrote:
> Nick a écrit :
>> Hi,
>> I have eclipse project in the CVS which has .project files specific
>> for Windows. For eg the libraries are hardcoded to U:/lib/...
>>
>> But U: is specific to windows and when the developers in the Unix
>> checkout the project it does not work for them. They have to manually
>> change the lib paths to Unix specific.
>>
>> Can you suggest a common way for giving the paths for independent of
>> the Windows/Linux. My libraries on Windows are on U: wheresas on Linux
>> are /home/sbcimp/ng/lib.
> You might want to use a classpath variable that is defined using U:/lib/
> on windows and /home/sbcimp/ng/lib on Unix.
> Then you extend it for a jar contained into this folder.
> This works for .classpath files. Not sure you can use the same trick for
> .project files.

.project files do not (usually) have any paths in them; it is the
.classpath files that you have to keep clean (or whatever corresponding
files CDT uses for C projects).
I always strive to include whatever libs are needed to build a project
in the project itself. That way there are no absolute paths in the build
path.
Another option is to put the libs in a separate project and have the
original one depend on the "lib" project. That works well if you have
several applications that all depend on the same set of libs.
Finally, there is the notion of a User Library, which is the same
principle as a Classpath Variable except that it can contain multiple
libraries grouped together.

Hope this helps,
Eric
Re: Eclipse Unix Windows [message #267417 is a reply to message #267411] Tue, 30 December 2008 14:48 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Eric. But I have windows dependent paths in the .project files as
copied below :
<linkedResources>
<link>
<name>tas_commonservices</name>
<type>2</type>
<location>U:/pkg/1.107.0.1</location>
</link>
</linkedResources>

I want to get ri of the U: which only works in windows and not in unix.

Please help.

Regards
Nick
Re: Eclipse Unix Windows [message #267419 is a reply to message #267417] Tue, 30 December 2008 23:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

You can get rid of those if you Import the project into your workspace
instead of linking to them outside of the workspace. Put the project
underversion control and have everybody check in and out of version
control into their eclipse workspace.

This is the way my co-worker I and work on. She's on windows, I run
Ubuntu linux.

Dave

Nick wrote:
> Thanks Eric. But I have windows dependent paths in the .project files as
> copied below :
> <linkedResources>
> <link>
> <name>tas_commonservices</name>
> <type>2</type>
> <location>U:/pkg/1.107.0.1</location>
> </link>
> </linkedResources>
>
> I want to get ri of the U: which only works in windows and not in unix.
>
> Please help.
>
> Regards
> Nick
>
Re: Eclipse Unix Windows [message #267425 is a reply to message #267417] Wed, 31 December 2008 09:35 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 12/30/2008 2:48 PM, Nick wrote:
> Thanks Eric. But I have windows dependent paths in the .project files as
> copied below :
> <linkedResources>
> <link>
> <name>tas_commonservices</name>
> <type>2</type>
> <location>U:/pkg/1.107.0.1</location>
> </link>
> </linkedResources>
>
> I want to get ri of the U: which only works in windows and not in unix.

Ah, I forgot about linked resources using absolute paths (that's why I
said "almost" in my message :-)
I tend to avoid linked resources whenever possible; as Dave already
said, it is usually best to have such things as projects in your
workspace and under source control (CVS, SVN, whatever). However, if you
must use linked resources, use a Path Variable to define its location.
See
http://help.eclipse.org/ganymede/topic/org.eclipse.platform. doc.user/concepts/cpathvars.htm


Hope this helps,
Eric
Previous Topic:key bindings broken
Next Topic:Screen with tutorials link gone
Goto Forum:
  


Current Time: Sun Jun 01 15:34:43 EDT 2025

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

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

Back to the top