OK, Java 101 is in session...
Java is a "tightly typed" language. This means that any variable has to be tied to a definite Object or primitive type. (As opposed to languages like Basic and Perl which let you assign anything to a variable and cause lots of grief down the line...) E.g. If a variable is declared as type
String, only String values can be assigned to it. The same is true of variables that are defined to real Objects, e.g. UserDAO and the like.
Java does not limit it's "namespace" to having just one unique object named "UserDAO". It lets you use this name for other objects. However, each class or object has a unique "package" that it belongs to. And so there is a fully qualified name for each object, eg. net.jforum.dao.UserDAO is different from com.my.jforum.dao.UserDAO.
However, to keep programmer from typing the long fully qualified name, Java has a variety of ways that can be used to allow just the short class name to be used.
The "can not find Symbol" class XXX means that the compiler can not link the short name of XXX to the fully qualified class you want.
The easy way to fix this is to add an "import" statement at the top of your class code to with the fully qualified classes you want to use from other packages. E.g.:
import net.jforum.dao.*;
Will allow all the classes from that package to be referred to by just the short class name. (FYI - This is where the two class missing Classes live.)
Alternatively, you can explicitly import just the classes you need. (Eclipse will do this for you automatically). This is slightly more efficient but not necessary. You can also not do an import and use the fully qualified Class name with no imports. E.g., type in net.jforum.dao.UserDAO each time you refer to this.
As to the "variable recipient" not found... try recipients as in the "List recipients =" variable declaration.
Now you know a little bit of Java programming magic...
[originally posted on jforum.net by monroe]