[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RE: IDE on Linux]



"Jason R. Kretzer" <jason@OpinionOne.com> wrote:
> Well, I am trying Eclipse 2.1, the GTK version on Linux.
> 
> Here is some background.  I already have a package/directory structure
> set up.  In the middle of this are some of my packages.  Up to this
> point I have been using a standard text editor -- nedit -- and then
> compiling from the command-line.  My package/directory looks something
> like this.
> 
>
JavaProjects.com.myCompany.aSubdir.anotherSubdir.myPackage.myClassesAndSource

Well, the first thing I see that is weird is that you have several
subdirectories.  While this can be worked around, in general the only
directory structure you have should reflect your package structure.  So... you
should either place the project in the "anotherSubdir" directory, or treat the
subdirectories as packages and place the project in the JavaProjects
directory.



> It also gives an 'import cannot be resolved' error on any classes I try
> to import into my code.

If you place the stuff under the JavaProjects directory, then the import
should be "import com.myCompany.aSubdir.anotherSubdir.myPackage.myClass;". 
Otherwise, it should simply be "import myPackage.myClass".  

So, in summary, what do you have as the "package" line for your source files? 
That is what will determine where you should home the project.

-josh

P.S.  What is the general rule on how to respond to messages in this group?  I
have always preferred inline responses, but I know that is not how most email
is answered.  Would it be preferred if I have the answers up top?  Should I
just respond to the individual, and not the group?