I have several classes that use the same JNI library, called \"jni\". In each of those classes, I have a System.loadLibrary() call in the class\'s static initializer:
Create a singleton class which load "jni" only during it's first instantiation, and call this singleton in class1 and class2 instead of System.loadLibrary("jni")