NoClassDefFoundError: com/pi4j/config/Config when running the java code om pi #171
Replies: 3 comments 1 reply
-
@peterivarsson On first glance all looks well. Do yo have the stack trace as well? |
Beta Was this translation helpful? Give feedback.
-
I have sript out everything except the row below. Context pi4j = Pi4J.newAutoContext(); I get this result: /*
*/ module se.peter.ivarsson.raspberry.gpio {
} |
Beta Was this translation helpful? Give feedback.
-
Looking at your command, i think the pi4j library is missing in the classpath, which explains the ClassNotFoundException |
Beta Was this translation helpful? Give feedback.
-
Hi,
Why does it complaining about NoClassDefFoundError
Is some dependencies missing?
/ Peter
****************** my java file
package se.peter.ivarsson.raspberry.gpio;
import com.pi4j.Pi4J;
import com.pi4j.context.Context;
import com.pi4j.io.i2c.I2C;
import com.pi4j.io.i2c.I2CConfig;
import com.pi4j.io.i2c.I2CProvider;
public class testGpio {
}
4.0.0 se.peter.ivarsson raspberry-gpio-test 1.0.0-SNAPSHOT jar UTF-8 11 11 2.0.0-alpha5 2.0********************** pom.xml file
Beta Was this translation helpful? Give feedback.
All reactions