Blame SOURCES/libwebp_jni_example.java

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