librec icon indicating copy to clipboard operation
librec copied to clipboard

Problem with adding resources

Open hdi-amiri opened this issue 8 years ago • 0 comments

If I want to config my recommender with a config file, if I try to load configuration from Resource it kind of ignores the config file, but If I try to set it manually it works fine: `

   Configuration conf = new Configuration();
    Properties prop = new Properties();
    InputStream input = null;

    try {
        input = new FileInputStream("conf/base/TrustMF-2013.properties");
        prop.load(input);
    } catch (IOException e) {
        e.printStackTrace();
    }


    for (String name : prop.stringPropertyNames()) {
        conf.set(name, prop.getProperty(name));
    }


     //        Configuration.Resource resource = new Configuration.Resource("conf/base/TrustMF-
       2013.properties");
  //        conf.addResource(resource);

`

hdi-amiri avatar May 25 '17 11:05 hdi-amiri