title: Pig Java UDF Issue
body: <p>Here is UDF code</p>
  
  <pre><code>package myudf;
  import java.io.IOException; 
  import java.text.ParseException;
  import java.text.SimpleDateFormat;
  import java.util.Date;
  
  import org.apache.pig.EvalFunc; 
  import org.apache.pig.data.Tuple; 
  
  public class DateFormat extends EvalFunc&lt;String&gt; {
      public String exec(Tuple input) throws IOException {
          if (input == null || input.size() == 0) {
              return null;
          }
  
          try {
              String dateStr = (String)input.get(0);
              SimpleDateFormat readFormat = new SimpleDateFormat( "MM/dd/yyyy hh:mm:ss.SSS aa");
              SimpleDateFormat writeFormat = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.SSS");
              Date date = null;
              try {
                  date = readFormat.parse(dateStr);
              } catch (ParseException e) {
                  e.printStackTrace();
              }
  
              return writeFormat.format(date).toString();
          } catch(Exception e) {
              throw new IOException("Caught exception processing input row ", e);
          }
      }
  }
  </code></pre>
  
  <p>Exported a Jar of this and registered in grunt</p>
  
  <pre><code>    Register /local/path/to/UDFDate.jar;
      A = LOAD 'hdfs date file';
      B = FOREACH A GENERATE UDFDate.myudf.DateFormat($0);
  </code></pre>
  
  <p>Gives Error </p>
  
  <blockquote>
    <p>[main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not
    resolve UDFDate.DateFormat using imports: [, java.lang.,
    org.apache.pig.builtin., org.apache.pig.impl.builtin.]</p>
  </blockquote>