lundi 9 février 2015

Eclipse: Why classes created manually aren't recognized?

For example: I'm making an Web project. At some line of one servlet, I put the following line:



ContatoDao dao = new ContatoDao();


So Eclipe complains that ContatoDao can't be found. And it's right; this class is at another package. So, in order to test, I copied contatoDao to the same directory of the present class (also changing it's package to the same package of the present class). But I keep getting this error:



HTTP Status 500 - Servlet execution threw an exception


(...)


root cause
java.lang.Error: Unresolved compilation problems:
ContatoDao cannot be resolved to a type
ContatoDao cannot be resolved to a type


Which doesn't occurs if I create the same class, at the same place, but using the create class of Eclipe. Why?





Aucun commentaire:

Enregistrer un commentaire