Blame SOURCES/libwebp_jni_example.java

d4f836
import com.google.webp.libwebp;
d4f836
d4f836
import java.lang.reflect.Method;
d4f836
d4f836
public class libwebp_jni_example {
d4f836
  static {
d4f836
    try {
d4f836
      System.load("/usr/lib64/libwebp-java/libwebp_jni.so");
d4f836
    } catch (UnsatisfiedLinkError e) {
d4f836
      System.load("/usr/lib/libwebp-java/libwebp_jni.so");
d4f836
    }
d4f836
  }
d4f836
d4f836
  /**
d4f836
   * usage: java -cp libwebp.jar:. libwebp_jni_example
d4f836
   */
d4f836
  public static void main(String argv[]) {
d4f836
    final int version = libwebp.WebPGetDecoderVersion();
d4f836
    System.out.println("libwebp version: " + Integer.toHexString(version));
d4f836
d4f836
    System.out.println("libwebp methods:");
d4f836
    final Method[] libwebpMethods = libwebp.class.getDeclaredMethods();
d4f836
    for (int i = 0; i < libwebpMethods.length; i++) {
d4f836
      System.out.println(libwebpMethods[i]);
d4f836
    }
d4f836
  }
d4f836
}