I come across this word several times such as The JDBC driver is not loaded at all.
or when container loads
.
My best guess is loading means fetching it into the memory from disk.
Am I correct?
I come across this word several times such as The JDBC driver is not loaded at all.
or when container loads
.
My best guess is loading means fetching it into the memory from disk.
Am I correct?
Yes, usually loading the class means, it is fetching from Memory disk using jvm's inbuilt class loader, called the bootstrap class loader or it can be loaded by any java.lang.ClassLoader
instances .
Given a class name @String, the class loader will try to load the class from directory defined by the CLASSPATH
environment varaible at runtime, in your case its JDBC driver class name which you would've specified in config file.
But loading in general will not be always reading class files from disk, it can also load from network using NetworkClassLoader
or it can be dynamically created by other application and can be loaded using ClassLoader.defineClass method which takes byte[].
Go through this Oracle doc, to know more about loading, linking and initializing.