Java Classloader

If you start a Java program (e.g. java Main.class) the classloader is responsible to load the needed classes, like you can figure out from the name. For that it searches in the following places:

  1. Bootstrap classes and archives are loaded (e.g. rt.jar in the JVM installation). You can configure them with the parameter java -Xbootclasspath
  2. Extension libraries are loaded. The default location of them is lib/ext in the oracle JVM installation
  3. Class-archives can also be loaded via classpath. The parameter is -classpath.

URL Classloader

 With the URL-classloader, you can load additional classes during programm execution. This is for example used by doing hot-deployment on an application server. You cannot load classes already loaded by classpath.

Keine Kommentare :

Kommentar veröffentlichen