Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » import package from sibling can not be resolved(my import statement is tagged as an error. How can I resolve it?)
import package from sibling can not be resolved [message #1445659] Wed, 15 October 2014 19:10 Go to next message
Gary Setter is currently offline Gary SetterFriend
Messages: 3
Registered: October 2014
Junior Member
Hi,
I have Eclipse Kepler and I'm new. I have an existing set of packages. I took one set and put it into a workspace. Since making the change, compiling the java from the set that moved is failing.
To be more specific my layout was like this:
c:: \programs\java\src\


    org

      descData

        MakeIndex.java

      jpedal

        objects

          Datum.java




I made a new directory, c:\programs\java\workspace
under it I now have
DescData

    src

      org

        descData

          MakeIndex.java

MakeIndex.java has these lines
package org.descData;
import org.jpedal.objects.Dataum;

The import line is tagged as an error.
I used my Debug Settings menu to add c:\programs\java\src to my class path ( or Build Path) which I thought would have resolved the problem but it did not.

BTW, I have classpath defined as classpath=.;C:\Programs\Java\src and when I use javac from the command line, it compiles successfully.

Have you any idea how I can resolve my import statement?
Gary
Re: import package from sibling can not be resolved [message #1446233 is a reply to message #1445659] Thu, 16 October 2014 14:35 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Eclipse uses its own classpath, not the environment classpath. Each
project has its own classpath.

On the project use mouse button 2 and select "Build path"->"Configure
Build Path..." and use the dialog to modify the build path for your project.

Rich
Re: import package from sibling can not be resolved [message #1447059 is a reply to message #1446233] Fri, 17 October 2014 18:31 Go to previous messageGo to next message
Gary Setter is currently offline Gary SetterFriend
Messages: 3
Registered: October 2014
Junior Member
Thank Rich,
So the "Run" -> "Debug Settings" dialog has nothing to do with the "Build path" dialog?
Re: import package from sibling can not be resolved [message #1447079 is a reply to message #1447059] Fri, 17 October 2014 19:19 Go to previous messageGo to next message
Eclipse UserFriend
Build path is used for both compiling and by default it becomes the
classpath when running. Typically you would never fool with the Run
settings paths. They just inherit from the build path.

On 10/17/2014 2:31 PM, Gary Setter wrote:
> Thank Rich,
> So the "Run" -> "Debug Settings" dialog has nothing to do with the
> "Build path" dialog?
Re: import package from sibling can not be resolved [message #1447695 is a reply to message #1447079] Sat, 18 October 2014 19:02 Go to previous message
Gary Setter is currently offline Gary SetterFriend
Messages: 3
Registered: October 2014
Junior Member
Again,
Thanks Rich. Problems solved!
Gary
Previous Topic:[Kepler] exported packages don't show up for import in other plug-ins
Next Topic:project
Goto Forum:
  


Current Time: Tue Apr 23 07:04:56 GMT 2024

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

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

Back to the top