Hi folks,
I´m new to Sigar development. I´m trying some stuff using Eclipse IDE. My development platform is Windows XP 5.1. I´ve put Sigar.jar in Eclipse buildpath and set the java.class.library environment to the directory where is the sigar-x86-winnt.dll.
Below is my code:
import org.hyperic.sigar.*;
public class Server {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(System.getProperty("java.library.path"));
Sigar sigar = new Sigar();
}
}
When I run the code above, the following exception is thrown:
Failed to load sigar-x86-winnt: java.lang.NullPointerException
org.hyperic.sigar.SigarException: Failed to load sigar-x86-winnt: java.lang.NullPointerException
at org.hyperic.sigar.Sigar.loadLibrary(Sigar.java:172)
at org.hyperic.sigar.Sigar.<clinit>(Sigar.java:102)
at br.com.unimedbh.Server.main(Server.java:15)
Does anyone have any idea of what is going on?
Thanks in advance.
Angelo
|