I'm using Eclipse in order to compile & run Java applications. I'm creating several projects, which I export as a jar file and import (add to build path) them as jar file in the other projects. I add the jar as follows:
- copy the jar to the project I want
- right click on the jar -> build path -> add to build path
It is my first time I'm getting this error:
java.lang.NoClassDefFoundError
I created a project which uses POI jars. The project name is "A". I export this project to A.jar file and import it (add to build path) in B project. When I'm running the B project and try to init (call the constructor) of an object from A.jar, I'm getting the following error:
java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/CellStyle
I checked the following threads:
But didn't find the answer.
Why am I getting this error? It isn't my first time, that I'm importing/adding to build path. But now I'm getting an error.
How can I solve it?