Re: can't import class in default package???

From: Andrew Marshall (058147m_at_acadiau.ca)
Date: 12/13/03

  • Next message: E.Otter: "Recommendations for Free/Cheap GUI-builder/RAD tool for Java Swing"
    Date: Sat, 13 Dec 2003 21:27:49 +0000
    
    

    On Sat, 13 Dec 2003 23:39:17 +0000, Raymond DeCampo wrote:

    > Kay wrote:
    >> Hi:
    >>
    >> I have a java fiile that resides at the default package under src folder. In
    >> the same project, when I want to import that class, I just need to type
    >>
    >> import ClassName
    >>
    >> right? However, eclipse cannot resolve it. But I can see the class in the
    >> automatic code completion pop up list if I just type the first 1 or 2 letter
    >> of the ClassName.
    >>
    >> So what should I do to import such class?
    >>
    >
    > In theory, if the class is in the default package, you shouldn't have to
    > import it. You are using the fully qualified name already.
    >
    > Ray

    Standard programming practices say that the default package is only used
    for simple programs. Any multi-packaged programs you make should be
    defined in their own packages, that have descriptive titles so that
    another programmer 4 years down the road can pick up your project and pick
    up where you left off.

    Andrew


  • Next message: E.Otter: "Recommendations for Free/Cheap GUI-builder/RAD tool for Java Swing"

    Relevant Pages