Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pack;
- import org.hyperic.sigar.*;
- public class NetworkData {
- public static void main(String[] args) {
- Sigar sigar = new Sigar();
- }
- }
- 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)
- # to find it later because you will need it ...
- cd ~/Downloads/
- # or whatever the latest one at the time of reading is ...
- curl https://netix.dl.sourceforge.net/project/sigar/sigar/1.6/hyperic-sigar-1.6.4.zip
- # unpack the package to the tmp dir
- sudo unzip -o /Users/phz/Downloads/hyperic-sigar-1.6.4.zip -d /tmp/
- # copy the libsigar-universal64-macosx.dylib to your class path dir
- sudo find /tmp/ -name libsigar-universal64-macosx.dylib
- -exec cp -v {} /Library/Java/Extensions/ ;
- # this cmd might be obsolete ...
- # copy the sigar.jar to your class path dir
- sudo find /tmp/ -name sigar*.jar
- -exec cp -v {} /Library/Java/Extensions/ ;
- # set you classpath dir, or add in ~/.bash_profile
- # or even better https://github.com/YordanGeorgiev/ysg-confs
- export CLASSPATH=$CLASSPATH:/Library/Java/Extensions
- # you should not see the error anymore
- cd $my_proj_dir ; sbt compile
- # neither here ..
- cd $my_project_dir ; clear ; sbt "test:testOnly *testClass"
Add Comment
Please, Sign In to add comment