ClassNotFoundException when running executable jar
问题 I created a jar file for utility files and added it as a dependency for my main project. When I run mvn install to build my main project, the correct utility jar is used in my unit tests. However, when I later run the main project jar using java -jar supervisor.jar , I get a java.lang.NoClassDefFoundError: caused by java.lang.ClassNotFoundException: com.seeq.utilities.process.OperatingSystem . In my unit tests, OperatingSystem is used and the tests run fine, so I am assuming that the utility