title: Is providing an implementation for all native methods required?
body: <p>Couldn't find this via a quick google search on "java unimplemented native methods" and the question title. Several sources say you must provide an implementation, but then they go on to call the function they've implemented, so it's kinda logical that they need a separate implementation.</p>
  
  <p>My question has a slightly different context.</p>
  
  <p>I have a Java Library that I want to use on Windows, Unix and Android.
  I have JNI for implementing a native library. For android, this library comes with specialized logging. This function is only present for android, and not for windows/unix. Can I declare a <code>public static native void log()</code> function and NOT provide an implementation, provided that I don't call the log function?</p>
  
  <p>This would allow me to provide the same library for windows, unix and android. Nobody would be calling the android log function on windows/unix anyway.</p>
  
  <hr>
  
  <p><strong>TL;DR:</strong> I have a class containing a method <code>public static native void a()</code> and <code>public static native void b()</code>. If I intend to call <code>a()</code> on platforms A, B and C, and intend to call <code>b()</code> only on platform C, do I have to provide an implementation for <code>b()</code> on platforms A and B?</p>