I was wondering if the imports that I use in each class (e.g., import java.io.IOException;
) are in the same moment libraries? Or are libraries something else?
A Java library is a jar file containing classes and other resources. To be available, at compile time and at runtime, this library (the jar file) must be present in the classpath.
Imports have nothing to do with libraries. Imports are used to allow the source code to use short class names instead of fully qualified names. For example, being able to code
List<String> list = new ArrayList<String>();
instead of
java.util.List<String> list = new java.util.ArrayList<String>();
Whether you use an import or use the fully qualified name, the Java compiler or the Java runtime must be able to find the class in its classpath. If the class is part of a library, then this library must be in the classpath.