title: JAVAH can't find class( android ndk)
body: <p>I need a help in javah and android-ndk.</p>
  <p>I tryed to generate H-file for my native method, but <strong>javah</strong> said <strong>class file not found</strong>.</p>
  <p>My target class has absolute name $PROJECT_DIRECTORY/<strong>src/bt/nativeclient/BtnativeActivity.java</strong> and contains follow code:</p>
  <pre><code>package bt.nativeclient;
  
  import android.app.Activity; import android.os.Bundle; import android.widget.TextView;
  
  public class BtnativeActivity extends Activity  {
      @Override
      public void onCreate(Bundle savedInstanceState) 
      {
          super.onCreate(savedInstanceState);
          TextView  tv = new TextView(this);
          tv.setText( stringFromJNI() );
          setContentView(tv);
      }
      
      public native String stringFromJNI();
      
      static 
      {
          System.loadLibrary(&quot;hello-jni&quot;);
      } 
   }
  </code></pre>
  <p>I tryed to start <strong>javah</strong> from follows pathes:</p>
  <pre><code>$(PROJECT_DIRECTORY)/bin$ javah -jni bt.nativeclient.BtnativeActivity
  $(PROJECT_DIRECTORY)/jni$ javah -jni bt.nativeclient.BtnativeActivity
  $(PROJECT_DIRECTORY)$ javah -jni bt.nativeclient.BtnativeActivity
  </code></pre>
  <p>I tryed to specify <strong>-classpath</strong> pathes:</p>
  <pre><code>$PROJECT_DIRECTORY/src$ javah -classpath :. bt.nativeclient.BtnativeActivity
  </code></pre>
  <p>I tryed to specify <strong>android.jar</strong> as mentioned <a href="https://stackoverflow.com/questions/7635624/android-javah-doesnt-find-my-class">there</a>:</p>
  <pre><code>$PROJECT_DIRECTORY/bin$ javah -classpath :/home/l/android-sdks/platforms/android-10/android.jar:. bt.nativeclient.BtnativeActivity
  </code></pre>
  <p>But always I get only one result:</p>
  <pre><code>error: cannot access bt.nativeclient.BtnativeActivity
  class file for bt.nativeclient.BtnativeActivity not found
  javadoc: error - Class bt.nativeclient.BtnativeActivity not found.
  Error: No classes were specified on the command line.  Try -help.
  </code></pre>
  <p>Moreover, with <strong>-verbose</strong> option command <strong>javah</strong> says that this command was seaching my class it the valid place:</p>
  <pre><code>$PROJECT_DIRECTORY/src$ javah **-verbose** -classpath :/home/l/android-sdks/platforms/android-10/android.jar:. bt.nativeclient.BtnativeActivity
  error: cannot access bt.nativeclient.BtnativeActivity
  class file for bt.nativeclient.BtnativeActivity not found
  javadoc: error - Class bt.nativeclient.BtnativeActivity not found.
  [ Search Path: /usr/lib/jvm/java-6-openjdk/jre/lib/resources.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/jsse.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/jce.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/charsets.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/netx.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/plugin.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/modules/jdk.boot.jar:/usr/lib/jvm/java-6-openjdk/jre/classes/:/home/l/android-sdks/platforms/android-10/android.jar:. ]
  Error: No classes were specified on the command line.  Try -help.
  </code></pre>
  <p>I think I have lost some important thing, but I still can't find resolution.</p>
  <p>Could anybody help me, please?</p>