title: java.lang.UnsatisfiedLinkError: org.hyperic.sigar.Cpu.gather(Lorg/hyperic/sigar/Sigar;)V
body: <p>The problem exists using eclips on window10</p>
  
  <pre><code>5월 25, 2017 9:15:52 오전 org.apache.catalina.core.StandardWrapperValve invoke
  심각: Servlet.service() for servlet [jsp] in context with path [/ESTIS] threw exception [An exception occurred processing JSP page /Estis/Admin_SystemMonitoring.jsp at line 51
  
  48:         SystemMonitoring sm=new SystemMonitoring();
  49:         CPUVo cpuVo=new CPUVo();
  50:         MemoryVo memoryVo=new MemoryVo();
  51:         cpuVo=sm.getCPU();
  52:         memoryVo=sm.getMemory();
  53:     %&gt;
  54:     &lt;div&gt;&lt;%=cpuVo.getTotalSysTime() %&gt;&lt;/div&gt;
  
  
  Stacktrace:] with root cause
  java.lang.UnsatisfiedLinkError: org.hyperic.sigar.Cpu.gather(Lorg/hyperic/sigar/Sigar;)V
      at org.hyperic.sigar.Cpu.gather(Native Method)
      at org.hyperic.sigar.Cpu.fetch(Cpu.java:30)
      at org.hyperic.sigar.Sigar.getCpu(Sigar.java:320)
      at org.hyperic.sigar.Sigar.getCpuPerc(Sigar.java:341)
      at SystemMonitoring.SystemMonitoring.getCPU(SystemMonitoring.java:27)
      at org.apache.jsp.Estis.Admin_005fSystemMonitoring_jsp._jspService(Admin_005fSystemMonitoring_jsp.java:163)
  </code></pre>
  
  <p>I call Sigar API in Admin_SystemMonitoring.jsp</p>
  
  <pre><code>public CPUVo getCPU()
  
      {
  
          System.out.println("================== CPU DATA ====================");
          Sigar sigar = new Sigar();
          CpuPerc cpu = null;
          CpuPerc[] cpus = null;
          CPUVo vo=new CPUVo();
          try
          {
              cpu = sigar.getCpuPerc();
              cpus = sigar.getCpuPercList();
              vo.setUserTime(CpuPerc.format(cpu.getUser()));
              vo.setTotalSysTime(CpuPerc.format(cpu.getSys()));
              vo.setTotalIdle(CpuPerc.format(cpu.getIdle()));
              System.out.println(String.format("Total User Time : %s / Total Sys Time : %s / Total Idle  : %s ",
                      vo.getUserTime(),
                      vo.getTotalSysTime(),
                      vo.getTotalIdle()));
  
          } catch (Exception e)
          {
              e.printStackTrace();
          }
          return vo;
      }
  </code></pre>
  
  <p>but the SystemMonitoring class do work, if I call in in java main class.
  also, I add Sigar.jar in (project-properties-java build path) and (WebContent-WEB-INF-lib) </p>
  
  <p>I don't know why it doesn't work if I call the method in jsp...
  how can I fix it?</p>