From: jrallen9 <jus...@te...> - 2010-06-16 22:01:34
|
I prefer to use this line of code: File executionPath = new File(""); System.load(executionPath.getAbsolutePath() + "/lib/sigar-lib/lib/libsigar-amd64-linux.so"); This assumes that you have a program directory with the jar and a lib directory with the sigar libs. Mine looks something like this: /var/opt/programs/monitor-test/Linux64.jar /var/opt/programs/monitor-test/lib/sigar-lib/lib/libsigar-amd64-linux.so I've created different build targets with different main classes for each platform i want to support. Then I change the strings in the code to point to the different libs to load. |