0

enter image description hereHow to resolve this Error? java.lang.NoClassDefFoundError: com/google/gson/GsonBuilder

I'm trying to build a DSL in Xtext in Eclipse IDE and I install the Gson Jar to class-path this project but still does't work. Any one has the same Problem?

Omran
  • 3
  • 2
  • More context is needed. How do you add dependencies to your project? What kind of a project is it? Some code would come a long way. Meanwhile, perhaps this would help you https://stackoverflow.com/questions/4961336/i-am-getting-java-lang-classnotfoundexception-com-google-gson-gson-error-even – Tarmo Mar 29 '23 at 11:49
  • this is case you should have added gson simply to the manifest as required bundle. and not as a jar to the project – Christian Dietrich Apr 03 '23 at 05:06
  • @ChristianDietrich thanks, adding gson in manifest fixed the problem. – Omran Apr 04 '23 at 07:26

1 Answers1

0

you can add the missing com.google.gson bundle to the required bundles in META-INF/MANIFEST.MF

Christian Dietrich
  • 11,778
  • 4
  • 24
  • 32