When we install the JDK, we create an environment variable called CLASSPATH, which has the value JAVA_HOME, which in turn has the jdk address, which contains all Java development libraries, correct? >
This is for the Java compiler to find the libraries needed to compile a Java application on this machine, correct?
Question 1: To run a Java application, does the JVM also search the ClassPath for libraries to run? Or does the Java executable already contain all the information the JVM needs?
At the same time, when we create a Java project in Eclipse, for example, eclipse generates two files inside .JAR: .project and .classpath . This .classpath is particular to every Java project right? And it also has the function of pointing the resource location (libraries) for compiling, or running or the 2, do not know , correct? But is not enough the existence of the CLASSPATH environment variable for the compiler to know where to look for resources? Or each project has a .classpath file because I can have libraries that are not in the path pointed to by the environment variable?