title: System.load for library loading
body: <p>I loaded a library from the <code>/system/libs/my_lib.so</code> directory successfully. How can I use the C/C++ functions which are defined in this library?</p>
  
  <pre><code>public class MainFrom extends Activity {
  
      private static final String LOG_TAG = "MainFrom";
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);  
          setContentView(R.layout.main); 
          // How to use the functions of test_lib.so? 
  
          /*
              java.lang.UnsatisfiedLinkError: stringFromC
  
  
          String s1 = stringFromC(), s2 = stringFromCpp();
  
          Log.w(LOG_TAG, stringFromC());   
          Log.w(LOG_TAG, stringFromCpp());  */
      }
  
      public native String stringFromC();
      public native String stringFromCpp();
  
      static {
          try { 
              System.load("/system/lib/test_lib.so");
              Log.i(LOG_TAG, "MainFrom. Success!");
          } catch (UnsatisfiedLinkError e) {
              Log.e(LOG_TAG, "MainFrom. UnsatisfiedLinkError");
          }
      }
  
  }
  </code></pre>
  
  <p><code>stringFromC</code> and <code>stringFromCpp</code> exist in <code>.c</code> and <code>.cpp</code> files which were compiled to <code>test_lib.so</code></p>