Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Project from existing sources
Project from existing sources [message #198395] Thu, 08 March 2007 00:48 Go to next message
Eclipse UserFriend
Originally posted by: tadams.aegisoft.com

Hi,

I'm trying to create a project from existing sources. The source files are
all in a directory called source, with the folders matching the packages
as is typical. Example:

src/com/packagepath/packagepath/etc

There are many many packages under source. I only need a few of them.

So, I try to make a new project from existing source.

If I choose src/ as the location of the source, it imports everything
under src into package explorer, but makes things "source folders", that
is:

com/thepackage/iwant

is a folder, with a "default package" beneath it.

If I choose src/com as the location of the source, com/ is chosen as the
source folder, and the packages are:

thepackage/iwant
theotherpackage/iwant

In either case, it breaks because the packages are not found. I want a
project called myProject, with 4-5 packages underneath it,
com/thepackage/iwant, com/thepackage,iwant2, etc. I'm not sure exactly
what a source folder is, versus a file-system folder and versus a java
package with the traditional folder setup, but I don't think I need any
source folders, just a project with packages beneath it.

How can I tell eclipse this?

Any help would be appreciated.
Re: Project from existing sources [message #198548 is a reply to message #198395] Thu, 08 March 2007 15:28 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse5.rizzoweb.com

TPA wrote:
> Hi,
>
> I'm trying to create a project from existing sources. The source files
> are all in a directory called source, with the folders matching the
> packages as is typical. Example:
>
> src/com/packagepath/packagepath/etc
>
> There are many many packages under source. I only need a few of them.
[snip]
> In either case, it breaks because the packages are not found. I want a
> project called myProject, with 4-5 packages underneath it,
> com/thepackage/iwant, com/thepackage,iwant2, etc. I'm not sure exactly
> what a source folder is, versus a file-system folder and versus a java
> package with the traditional folder setup, but I don't think I need any
> source folders, just a project with packages beneath it.
>
> How can I tell eclipse this?
>
> Any help would be appreciated.
>

My first recommendation is to open the Help Contents and navigate to the
Java Development User Guide > Getting Started, where you will find a
couple of tutorials. Go through them and you'll understand a lot more
about how Eclipse works and how to use it. Specifically, one of the
tutorials talks about project organization in particular.
The short answer is that you HAVE to have soruce folders defined - that
is how Eclipse knows what files you want it to build. In your setup, it
sounds pretty basic and you just need to define one source folder, src/.
If you want to exclude some packages that are under src/, you can do
that, too.

Please use the tutorials - it is a couple of hours that will repay you
many times over.

Hope this helps,
Eric
Previous Topic:javac.exe in Java 6.0 versus Eclipse internal compiler
Next Topic:Eclipse startup error please help
Goto Forum:
  


Current Time: Fri Apr 26 08:54:07 GMT 2024

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

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

Back to the top