>From my computer running commands from the command line works fine...
like: java -jar sigar.jar cpuinfo this command returns all of my cpuinfo. But, I'm trying to build an application in Java with the libraries import in. When I run this command it returns a 0 instead of my MHz :
import org.hyperic.sigar.*;
try {
CpuInfo getcpu = new CpuInfo();
int cpuspeed = getcpu.getMhz();
System.out.println(cpuspeed);
} catch (Exception ex) {
Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
}
|