Hi im using a third party lib name Hyperic Sigar. When i run my code it shows error,
This is my code:
package pack;
import org.hyperic.sigar.*;
public class NetworkData {
public static void main(String[] args) {
Sigar sigar = new Sigar();
}
}
This is the error message:
1 [main] DEBUG Sigar - no libsigar-universal64-macosx.dylib in java.library.path
org.hyperic.sigar.SigarException: no libsigar-universal64-macosx.dylib in java.library.path
at org.hyperic.sigar.Sigar.loadLibrary(Sigar.java:172)
at org.hyperic.sigar.Sigar.<clinit>(Sigar.java:100)
at pack.NetworkData.main(NetworkData.java:10)
Im developing on Mac Osx Snow Leopard Using Eclipse IDE for Java Developers is found some old post("no sigar-x86-winnt.dll in java.library.path" error when using Hyperic SIGAR on multi language OS) The post says that i need to add some path, if so... How do i add that path in Mac Osx? Do hope someone can help^^
First You need to add
Sigar.jarto your library, then add .dylib file to your library (you need to pick file for your OS what you are using). In your case you should addlibsigar-universal64-macosx.dylibyou can find these files in"hyperic-sigar-1.6.4/sigar-bin/lib".