Package problem - PLEASE HELP.

Discussion in 'Java' started by Gandu, Jul 8, 2003.

  1. Gandu

    Gandu Guest

    Could some Java Guru help me? I have a subdirectory(named Testpackage) inside
    a directory(named Tempjava). The subdirectory Testpackage contains an
    interface(Testinterface.java) and a concrete class that implements that
    interface(Test.java). If I get into the directory Tempjava and type:
    javac Testpackage/Test.java
    I get the error message:
    Testpackage/Test.java:5: cannot resolve symbol
    symbol : class Testinterface
    location: class Testpackage.Test
    public class Test implements Testinterface{
    ^
    1 error

    I have included the interface class and concrete class below:
    //Testinterface.java
    package Testpackage;

    public interface Testinterface{
    void doit();
    }
    //Test.java
    package Testpackage;

    import java.io.*;

    public class Test implements Testinterface{

    public void doit(){}

    public static void main(String [] args){
    System.out.println("Implementing interface in package");
    }
    }

    Could someone please tell me what exactly to do to get around this
    problem. Thanks in advance for your help.
    Gandu, Jul 8, 2003
    #1
    1. Advertising

  2. Gandu

    Brad BARCLAY Guest

    Gandu wrote:
    > Could some Java Guru help me? I have a subdirectory(named Testpackage) inside
    > a directory(named Tempjava). The subdirectory Testpackage contains an
    > interface(Testinterface.java) and a concrete class that implements that
    > interface(Test.java). If I get into the directory Tempjava and type:
    > javac Testpackage/Test.java
    > I get the error message:
    > Testpackage/Test.java:5: cannot resolve symbol
    > symbol : class Testinterface
    > location: class Testpackage.Test
    > public class Test implements Testinterface{


    Make sure you have Tempjava in your CLASSPATH. Either that, or go into
    Testpackage and run "javac *.java" to compile everything at once.

    Brad BARCLAY

    --
    =-=-=-=-=-=-=-=-=
    From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
    The jSyncManager Project: http://www.jsyncmanager.org
    Brad BARCLAY, Jul 8, 2003
    #2
    1. Advertising

  3. Gandu

    Roedy Green Guest

    On Tue, 08 Jul 2003 05:35:15 GMT, Brad BARCLAY
    <> wrote or quoted :

    >subdirectory(named Testpackage)


    packages and the directories that contain them should have lower case
    names. They had better match precisely.


    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
    Roedy Green, Jul 8, 2003
    #3
  4. Gandu

    Brad BARCLAY Guest

    Roedy Green wrote:

    >>subdirectory(named Testpackage)

    >
    > packages and the directories that contain them should have lower case
    > names. They had better match precisely.


    Not necessarily. The only element in the spec that specifically
    _requires_ lower-case characters is the TLD (which in the JLS v1.0 spec
    was supposed to be all uppercase).

    Everything after the TLD has no specific case requirements.

    Brad BARCLAY

    --
    =-=-=-=-=-=-=-=-=
    From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
    The jSyncManager Project: http://www.jsyncmanager.org
    
    Brad BARCLAY, Jul 8, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Parvinder
    Replies:
    6
    Views:
    736
    Thomas G. Marshall
    Feb 27, 2005
  2. Replies:
    4
    Views:
    492
    Chris Uppal
    May 5, 2005
  3. KK
    Replies:
    2
    Views:
    528
    Big Brian
    Oct 14, 2003
  4. MuZZy
    Replies:
    7
    Views:
    1,723
    Mike Hewson
    Jan 7, 2005
  5. Ohm
    Replies:
    2
    Views:
    118
    Tad McClellan
    Apr 5, 2005
Loading...

Share This Page