title: freemarker error loading template
body: <p>Getting the below exception, does anyone have solution for this 
  also as shown in mongodb tutorial , its actually .ftl , here i have given html file 
  And im unable to create .ftl file </p>
  
  <pre><code>package com.mongodb;
  
      import freemarker.template.Configuration;
      import freemarker.template.Template;
  
      import java.io.StringWriter;
      import java.util.HashMap;
      import java.util.Map;
  
      /**
       * Created by tadoori on 10/20/2016.
       */
      public class HelloworldFreemarkerStyle {
  
          public static void main(String[] args) {
              Configuration configuration = new Configuration();
              configuration.setClassForTemplateLoading(HelloworldFreemarkerStyle.class, "/");
  
              try {
  
                  Template helloTemplate = configuration.getTemplate("hello.html");
                  StringWriter writer = new StringWriter();
                  Map&lt;String, Object&gt; helloMap = new HashMap&lt;String, Object&gt;();
                  helloMap.put("name", "Freemark");
  
                  helloTemplate.process(helloMap, writer);
  
                  System.out.println(writer);
  
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
      }
  </code></pre>
  
  <p>This is below on running the java file </p>
  
  <pre><code>java.io.FileNotFoundException: resources does not exist.
      at freemarker.cache.FileTemplateLoader$1.run(FileTemplateLoader.java:125)
      at java.security.AccessController.doPrivileged(Native Method)
      at freemarker.cache.FileTemplateLoader.&lt;init&gt;(FileTemplateLoader.java:122)
      at freemarker.cache.FileTemplateLoader.&lt;init&gt;(FileTemplateLoader.java:108)
      at com.mongodb.HelloworldFreemarkerStyle.main(HelloworldFreemarkerStyle.java:23)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
  </code></pre>