Guest User

Untitled

a guest
Oct 19th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. package pack;
  2.  
  3. import org.hyperic.sigar.*;
  4.  
  5. public class NetworkData {
  6. public static void main(String[] args) {
  7. Sigar sigar = new Sigar();
  8. }
  9.  
  10. }
  11.  
  12. 1 [main] DEBUG Sigar - no libsigar-universal64-macosx.dylib in java.library.path
  13. org.hyperic.sigar.SigarException: no libsigar-universal64-macosx.dylib in java.library.path
  14. at org.hyperic.sigar.Sigar.loadLibrary(Sigar.java:172)
  15. at org.hyperic.sigar.Sigar.<clinit>(Sigar.java:100)
  16. at pack.NetworkData.main(NetworkData.java:10)
  17.  
  18. # to find it later because you will need it ...
  19. cd ~/Downloads/
  20.  
  21. # or whatever the latest one at the time of reading is ...
  22. curl https://netix.dl.sourceforge.net/project/sigar/sigar/1.6/hyperic-sigar-1.6.4.zip
  23.  
  24. # unpack the package to the tmp dir
  25. sudo unzip -o /Users/phz/Downloads/hyperic-sigar-1.6.4.zip -d /tmp/
  26.  
  27. # copy the libsigar-universal64-macosx.dylib to your class path dir
  28. sudo find /tmp/ -name libsigar-universal64-macosx.dylib
  29. -exec cp -v {} /Library/Java/Extensions/ ;
  30.  
  31. # this cmd might be obsolete ...
  32. # copy the sigar.jar to your class path dir
  33. sudo find /tmp/ -name sigar*.jar
  34. -exec cp -v {} /Library/Java/Extensions/ ;
  35.  
  36. # set you classpath dir, or add in ~/.bash_profile
  37. # or even better https://github.com/YordanGeorgiev/ysg-confs
  38. export CLASSPATH=$CLASSPATH:/Library/Java/Extensions
  39.  
  40. # you should not see the error anymore
  41. cd $my_proj_dir ; sbt compile
  42.  
  43. # neither here ..
  44. cd $my_project_dir ; clear ; sbt "test:testOnly *testClass"
Add Comment
Please, Sign In to add comment