You can set system properties by using the parameter "-D" when you invoke the Java Virtual Machine on the command line:
java -Djna.library.path=<path to your library> MainClass
You can also set this programmatically in your code at your applications's startup when it has been read from e.g. a config file:
System.setProperty("jna.library.path", <path to your library>);
I haven't used JNA myself, so I don't know if it is actually too late for the JVM when you set the value in code. In that case, go with the first option.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…