Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » share classes
share classes [message #268806] Thu, 26 August 2004 08:07 Go to next message
Eclipse UserFriend
Originally posted by: fgarriga.sam-meteo.com

I need share the same .java file in differents projects, how I do it with
eclipse ?
Re: share classes [message #268820 is a reply to message #268806] Thu, 26 August 2004 10:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Ferran wrote:

> I need share the same .java file in differents projects, how I do it with
> eclipse ?
>

Projects can depend on other projects. Put the shared classes in one
Project (called, for example, Common or Shared), then on the Properties
dialog for other Projects you can select Project References and choose
the Common/Shared project.

HTH,
Eric
Re: share classes [message #268960 is a reply to message #268820] Fri, 27 August 2004 05:36 Go to previous message
Eclipse UserFriend
Originally posted by: fgarriga.sam-meteo.com

That's ok but the files that we want to share, have references to other
files that I don't want to share. For resolve this, I refer the
sharedProject to the others project and A cycle was detected in the build
path of project (error). For example:

Project A:
not share file A
not share file B
not share file C
share file SA (reference to A)
share file SB (reference to C)

Project B:
not share file A
not share file D
share file SA (reference to A)

Solution ->

Project A:
not share file A
not share file B
not share file C
--> reference to Common Project

Project B:
not share file A
not share file D
--> reference to Common Project

Common Project:
share file SA
share file SB
-> reference to Project A
-> reference to Project B

* Note: If I don't make the references in the common project to project A
ans B, common project don't compile.

Thanks



Eric Rizzo wrote:

> Ferran wrote:

> > I need share the same .java file in differents projects, how I do it with
> > eclipse ?
> >

> Projects can depend on other projects. Put the shared classes in one
> Project (called, for example, Common or Shared), then on the Properties
> dialog for other Projects you can select Project References and choose
> the Common/Shared project.

> HTH,
> Eric
Previous Topic:Feature Request: Improvement in Code Assist
Next Topic:adding File explorer/Navigator to RCP application
Goto Forum:
  


Current Time: Tue Jul 08 20:12:50 EDT 2025

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

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

Back to the top