Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Difficulty setting up Eclipse project with packages
Difficulty setting up Eclipse project with packages [message #175086] Tue, 17 October 2006 17:07 Go to next message
Eclipse UserFriend
Originally posted by: lonewolf32us.yahoo.com

Hi,

I have a set of java (SWIG-generated) files that already exists, and
they are in the folder
<base folder>\myproduct\src\java\com\mycompany\mpe\swig

Then I hava a main.java that is in
<base folder>\myproduct\src\java\com\mycompany\mpe

I want the output class files to go to
<base folder>\myproduct\bin\com\...

Eclipse can't seem to figure out my directory structure. When I open
Eclipse I tell it to make my workspace directory be <base folder>. Then
I create a new project and Eclipse figures out where my source files
are, and even can guess correctly where my output files should go.

But, there are errors in every file saying
"The declared package "com.mycompany.mpe.swig" does not match the
expected package "swig"."

And in my main.java the error is
The import "com.mycompany" cannot be resolved

What is the right way to set up a new Eclipse project with pre-existing
files and discrete package subdirectories?

Thanks.
Dave
Re: Difficulty setting up Eclipse project with packages [message #175128 is a reply to message #175086] Tue, 17 October 2006 19:26 Go to previous message
Eclipse UserFriend
Originally posted by: lonewolf32us.yahoo.com

Dave Ludwig wrote:
> Hi,
>
> I have a set of java (SWIG-generated) files that already exists, and
> they are in the folder
> <base folder>\myproduct\src\java\com\mycompany\mpe\swig
>
> Then I hava a main.java that is in
> <base folder>\myproduct\src\java\com\mycompany\mpe
>
> I want the output class files to go to
> <base folder>\myproduct\bin\com\...
>
> Eclipse can't seem to figure out my directory structure. When I open
> Eclipse I tell it to make my workspace directory be <base folder>. Then
> I create a new project and Eclipse figures out where my source files
> are, and even can guess correctly where my output files should go.
>
> But, there are errors in every file saying
> "The declared package "com.mycompany.mpe.swig" does not match the
> expected package "swig"."
>
> And in my main.java the error is
> The import "com.mycompany" cannot be resolved
>
> What is the right way to set up a new Eclipse project with pre-existing
> files and discrete package subdirectories?
>
> Thanks.
> Dave

I think I got it. My global default "source" directory (Java/Build
Path/Source directory) was configured as "src" and my files were in
"src\java".
Previous Topic:Ubuntu, eclipse and /home->/media/sda8/ annoyance
Next Topic:could not find main class. program will exit
Goto Forum:
  


Current Time: Thu Apr 25 22:30:12 GMT 2024

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

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

Back to the top