title: NoClassDefFoundError even though jar is in the module path Eclipse
body: <p>I am working on a vanilla Eclipse project and trying to avoid using Maven.</p>
  <p>I have added Jackson modules to the module path as an external jar. When I do so, the import statement no longer shows an error but when I run my program I get the following error</p>
  <blockquote>
  <p>Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError:
  com/fasterxml/jackson/databind/ObjectMapper   at
  bitcoin.PriceConverter.getJsonFromUrl(PriceConverter.java:48)     at
  bitcoin.PriceConverter.main(PriceConverter.java:26) Caused by:
  java.lang.ClassNotFoundException:
  com.fasterxml.jackson.databind.ObjectMapper   at
  java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
  at
  java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
  ... 2 more</p>
  </blockquote>
  <p>Line 48 in PriceConverter is ObjectMapper objMapper = new ObjectMapper();</p>
  <p><a href="https://i.stack.imgur.com/RevAT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RevAT.png" alt="modulepath" /></a></p>
  <p>I have googled extensively and found that my classpath is potentially broken however, all of the answers are from outdated versions of Eclipse and I cannot work out how to fix this problem.</p>
  <p>I tried the same thing with Gson and had the same problem however, yesterday I added the json-20210307.jar and it worked fine.</p>
  <p>Can anyone explain what is happening here and guide me on how to fix it?</p>