I am using eclipse. I was told that, whenever I import a package for new functionality, I should to add it to lib folder and then right-click on it -> Build Path -> Add to build path.
What happens if I just import the package into my lib folder and leave it alone?
I don't understand whats going on behind the scenes. Why am I required to do that?
Thanks in advance.
Because Eclipse doesn't treat the "lib" folder as any special folder, so it doesn't know the files in it should be added to the class path / build path. You must specify this specifically for each single JAR file you need.
A little off the topic, but hopefully helpful: use Maven for your builds and use the m2eclipse plugin. Then the dependencies in your Maven build script (pom.xml) will be synched with the libraries that Eclipse knows about.