I'm working on a project that gets compiled into a JAR and then deployed using javaws. In one of my classes, I need to load the libandroid_runtime.so found in directory /system/lib/ on the device.
How do I do this?
System.load("libandroid_runtime")throws java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: libandroid_runtime
System.loadLibrary("/system/lib/libandroid_runtime.so") throws java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: /system/lib/libandroid_runtime.so.
System.loadLibrary("android_runtime"); throws java.lang.UnsatisfiedLinkError: no android_runtime in java.library.path
thanks!
Android does not use Java Web Start.
That is not possible. You do not have read access to
/system
.System.loadLibrary("android_runtime");
requires the library libandroid_runtime.so to be in /data/data/{app}/lib whileSystem.load("/system/lib/libandroid_runtime.so");
requires the full path.So none of your calls is correct. The answer is
System.load("/system/lib/libandroid_runtime.so");