Re: extends "cannot be resolved to a type"




"Ben Collver" <collver@xxxxxxxx> wrote in message
news:fuSdnSa5QrNtGJfbnZ2dnUVZ_r-onZ2d@xxxxxxxxxxxxxxxxxx
My source code is in the following locations.
http://terrorpin.net/~ben/docs/comp/lang/java/HelloDate.java
http://terrorpin.net/~ben/docs/comp/lang/java/HelloDate2.java

I am using IBM PowerPC Linux JDK 1.5 on Fedora Core 6. HelloDate.java
compiles fine and produces a working class. When I try to compile
HelloDate2.java, I get an error. What does this error message actually
mean?


[ben@tidbit bens]$ javac HelloDate2.java
----------
1. ERROR in HelloDate2.java (at line 1)
class HelloDate2 extends HelloDate
^^^^^^^^^
HelloDate cannot be resolved to a type

The error is saying that it cannot find this "HelloDate" class that
you are referring to.

Did you try compiling the files while ensuring that the current
directory be ~ben/docs/comp/lang/java/ ? Did you ensure that "." (the
current directory) is part of the CLASSPATH environment variable?

- Oliver


.