Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Include one directory from one java project into current project(Include one directory from one java project into current project)
Include one directory from one java project into current project [message #545449] Wed, 07 July 2010 19:49 Go to next message
Al Mising name is currently offline Al Mising nameFriend
Messages: 123
Registered: July 2009
Senior Member
How to I include one directory (containing either .java or .class files) from another java project into my current project?

I can include the entire other project, but this is way more than I need. I've tried adding class folders in the project properties, but this doesn't work.I've also tried "Project -> Properties -> Source Tab -> Link Source ... but it doesn't work (ie can't find package specified in import statement)

At least one problem is that, linking the source as above, it puts the directory that is linked to under the default package in the current project, and of course the source code has its own package path the conflicts with this, and it doesn't allow renaming the package when linking to the source.
Re: Include one directory from one java project into current project [message #545476 is a reply to message #545449] Wed, 07 July 2010 21:16 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
"Al" <allelopath@hotmail.com> wrote in message
news:i12lp0$g5c$1@build.eclipse.org...
> How to I include one directory (containing either .java or .class files)
> from another java project into my current project?
>
> I can include the entire other project, but this is way more than I need.
> I've tried adding class folders in the project properties, but this
> doesn't work.I've also tried "Project -> Properties -> Source Tab -> Link
> Source ... but it doesn't work (ie can't find package specified in import
> statement)
>
> At least one problem is that, linking the source as above, it puts the
> directory that is linked to under the default package in the current
> project, and of course the source code has its own package path the
> conflicts with this, and it doesn't allow renaming the package when
> linking to the source.

You can setup a project dependency to get access to the classes in the other
project. On the project that needs to see the other one, open up the
Project Properties. Go to the Java Build Path page and select the Projects
tab. Select the other project as a dependency.
Re: Include one directory from one java project into current project [message #545662 is a reply to message #545449] Thu, 08 July 2010 14:29 Go to previous message
Al Mising name is currently offline Al Mising nameFriend
Messages: 123
Registered: July 2009
Senior Member
David,

Thanks for your reply.

I understand that I can select the entire project, but that is not what I am looking for. I want to include only certain directories or files from another project. Since I've posted, I've learned how to do this. You select the entire project (as you've said) but then then "Include" only those packages or files desired.

Thanks,
Al
Previous Topic:Any way to know when bundles are started?
Next Topic:Read-only editor content: ByteArrayStorage & ByteArrayStorageEditorInput
Goto Forum:
  


Current Time: Thu Apr 25 03:39:48 GMT 2024

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

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

Back to the top