Follow Us
Contribute
  • Register
Errorbase is a collaborative writing project, that aims to build the largest trouble-shooting guide about all kinds of error messages.

Categories

0 votes
This is one of the most common error messages in java and it has got so many causes. It is genereated during compile time and it means that java cannot find the class that is defined in the error.
requested by (170k points)
edited by

1 Solution

0 votes

Importing the Vector class will simply solve the problem.
 package SomePackage;

 import java.util.Vector;

 public Class SomeClass {

     Vector vector;

 }

The most common cause of this error message is defining a class within java APIs and not including it with the import keyword. Ex:
 package SomePackage;

 public Class SomeClass {

     Vector vector;

 }

This code will generate Vector cannot be resolved to a type error.

solved by (170k points)
edited by
...