title: Class is present. But it complaints
body: <pre><code> package org.myorg;
  
   import java.security.PrivilegedExceptionAction;
  
   import org.apache.hadoop.conf.*;
   import org.apache.hadoop.security.UserGroupInformation;
   import org.apache.hadoop.fs.Path;
   import org.apache.hadoop.fs.FileSystem;
   import org.apache.hadoop.fs.FileStatus;
  
   public class Write{
  
    public static void main(String args[]) {
  
      try {
          UserGroupInformation ugi = UserGroupInformation.createRemoteUser("hbase");
  
          ugi.doAs(new PrivilegedExceptionAction&lt;Void&gt;() {
  
              public Void run() throws Exception {
  
                  Configuration conf = new Configuration();
                  conf.set("fs.defaultFS", "hdfs://10.236.173.95:8020/user/hbase");
                  conf.set("hadoop.job.ugi", "hbase");
  
                  FileSystem fs = FileSystem.get(conf);
  
  
                   fs.createNewFile(new Path("/user/hbase/test"));
  
                   System.out.println("File Created");
  
                  return null;
              }
          });
      } catch (Exception e) {
          e.printStackTrace();
      }
     }
   }
  </code></pre>
  
  <p>This is my java program. I have downloaded my jar from <a href="http://www.java2s.com/Code/Jar/h/Downloadhadoop0201devcorejar.htm" rel="nofollow">this site</a>. I can see UserGroupInformation class is there. I checked createRemoteUser method is a member of this class.</p>
  
  <p>I compile this program using</p>
  
  <pre><code>  javac -classpath hadoop-0.20.1-dev-core.jar -d Write/ Write.java
  </code></pre>
  
  <p>My directory structure contains</p>
  
  <pre><code> jarfile WriteDirectory Write.java
  </code></pre>
  
  <p>I am getting the following error</p>
  
  <pre><code> Write.java:16: error: cannot find symbol
          UserGroupInformation ugi =   UserGroupInformation.createRemoteUser("hbase");
                                                         ^
   symbol:   method createRemoteUser(String)
   location: class UserGroupInformation
   Write.java:18: error: cannot find symbol
          ugi.doAs(new PrivilegedExceptionAction&lt;Void&gt;() {
             ^
   symbol:   method doAs(&lt;anonymous PrivilegedExceptionAction&lt;Void&gt;&gt;)
   location: variable ugi of type UserGroupInformation
   2 errors
  </code></pre>
  
  <p>What could be the reason?</p>