Here I have two ways to call System.LoadLibrary("XX.so"):
First way:
class SomeClass{
static {
System.LoadLibrary("XX.so");
};
public SomeClass(){
..
};
}
The Other way:
class SomeClass{
public SomeClass(){
System.LoadLibrary("XX.so");
..
};
}
In most codes, I saw the first way is used. But second way also can run fine.
Do they have any difference between them ?