title: Native2Ascii API
body: <p>I'm trying to perform the Native2Ascii Task by using the API. MY code look s like this:</p>
  
  <pre><code>public static void main(String[] args) {
      File sourceDir = new File("c://temp//");        
      File targetDir = new File("c://temp1//");
      Native2Ascii n2a = new Native2Ascii();
      n2a.setSrc(sourceDir);
      n2a.setDest(targetDir);
      n2a.setEncoding("utf8");
      n2a.execute();
  }
  </code></pre>
  
  <p>Unfortunately I get the following exception in the line n2a.execute():</p>
  
  <pre><code>java.lang.NullPointerException
      at org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:529)
      at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:492)
      at org.apache.tools.ant.taskdefs.MatchingTask.getDirectoryScanner(MatchingTask.java:192)
      at org.apache.tools.ant.taskdefs.optional.Native2Ascii.execute(Native2Ascii.java:239)
      at Native2AsciiTest.main(Native2AsciiTest.java:27)
  Exception in thread "main" 
  </code></pre>
  
  <p>Does anybody know what the problem is?</p>