Compile doesn't see the derived class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • newbieBrian
    New Member
    • Nov 2007
    • 17

    Compile doesn't see the derived class

    Hi All,

    I have an abstract class,called Mybase.java, for example. I have a derived class called MyDerived.java that extends Mybase.java.

    From the window command line, I compile the Mybase.java successfully, as it should be. When I compile Myderived.java I got the error:

    C:\test\Myderiv ed.java:3: cannot fsymbol: class Mybase
    public class Myderived extends Mybase

    Please give me some help/idea of what I am doing wrong. Thanks.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by newbieBrian
    Hi All,

    I have an abstract class,called Mybase.java, for example. I have a derived class called MyDerived.java that extends Mybase.java.

    From the window command line, I compile the Mybase.java successfully, as it should be. When I compile Myderived.java I got the error:

    C:\test\Myderiv ed.java:3: cannot fsymbol: class Mybase
    public class Myderived extends Mybase

    Please give me some help/idea of what I am doing wrong. Thanks.
    You need to tell the compiler where to find the .class file for Mybase.
    But before we do that, are you sure you are typing the class name correctly (including case) in the MyDerived class (or is it Myderived?).
    Also are these classes in the same folder/package.

    Comment

    • newbieBrian
      New Member
      • Nov 2007
      • 17

      #3
      Sorry for the misspell, since it is not real files. I do have the java files spelling correctly. In fact, I was able to run the project using the eclipse. But I have trouble
      setting up to work with the command line. Thanks any way.

      Comment

      Working...