jSensors
jSensors copied to clipboard
Error
Hello, I tried to use jSensors for a university project, but I always get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at com.profesorfalken.jsensors.SensorsConfig.
Any Ideas on how to solve it? I'm just running the basic tests on README. It says that the problem is on this line: Components components = JSensors.get.components(); Thanks!
Hello,
How did you add it to the classpath? Did you use Maven?
If you just download the Jar here: http://mvnrepository.com/artifact/com.profesorfalken/jSensors/1.0.2 make sure that you have also downloaded all the dependencies (titled as 'Compile Dependencies' in the page ) and added them to your classpath.
Best regards
Hello, Sorry for the long time, I use netbeans on a windows 7 laptop. I already add the jar file to my classpath but still have the same error.
Thanks!
I've installed the missing jars, and then i got a new error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/profesorfalken/jpowershell/PowerShellNotAvailableException at com.profesorfalken.jsensors.manager.windows.WindowsSensorsManager.getSensorsData(WindowsSensorsManager.java:39) at com.profesorfalken.jsensors.manager.SensorsManager.getComponents(SensorsManager.java:48) at com.profesorfalken.jsensors.SensorsLocator.getComponents(SensorsLocator.java:34) at com.profesorfalken.jsensors.JSensors.components(JSensors.java:73) at monitoradordetemp.MonitoradorDeTemp.main(MonitoradorDeTemp.java:19) Caused by: java.lang.ClassNotFoundException: com.profesorfalken.jpowershell.PowerShellNotAvailableException at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 5 more C:\Users\YiazmaT\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1 FALHA NA CONSTRUÇÃO (tempo total: 0 segundos)
I'm using windows 7 ultimate, and i already have installed the windows power shell.
Hello,
It seems that it does not find the jPowerShell JAR in the classpath at runtime.