私はこのように読むサービスインターフェースを持っています
package services;
import domain.Items;
public interface IItemsService extends IService {
public final String NAME = "IItemsService";
/** Places items into the database */
public void storeItem(Items items);
/** Retrieves items from the database
 * 
 * @param category
 * @param amount
 * @param color
 * @param type
 * @return
 * @throws ClassNotFoundException 
 */
public Items getItems (String category, float amount, String color, String type) throws ItemNotFoundException, ClassNotFoundException;
}
そして、こんな感じの工場…
package services;
public class Factory {
public Factory(){}
@SuppressWarnings("unchecked")
public IService getService(String name) throws ServiceLoadException {
    try {
        Class c = Class.forName(getImplName(serviceName));
        return (IService)c.newInstance();
    } catch (Exception e) {
        throw new ServiceLoadException(serviceName + "not loaded");
    }
}
private String getImplName (String name) throws Exception {
    java.util.Properties props = new java.util.Properties();
        java.io.FileInputStream fis = new java.io.FileInputStream("properties.txt");
            props.load(fis);
                fis.close();
                return props.getProperty(serviceName);
}
}
これは非常に単純なはずですが、2 つのエラーが発生し続けます。IService は (ファクトリとサービスの両方で) タイプに解決できません。また、ファクトリで serviceName を変数エラーに解決できません。私は単純なものが欠けていることを知っています...