Java学习笔记-Class Loaders 博客分类: Java学习笔记 JavaEXTCC++C#
A Java compiler converts source instructions for the Java virtual machine. The virtual machine code is stored in a class file with a .class extension. Each class file contains the definition and implementation code for one class or interface. These class files must be interpreted by a program that can translate the instruction set of the virtual machine into the machine language of the target machine.
The class loading mechanism doesn't just use a single class loader, however. Every Java program has at least three class loaders:
-
The bootstrap class loader
-
The extension class loader
-
The system class loader (also sometimes called the application class loader
The bootstrap class loader loads the system classes (typically, from the JAR file rt.jar ). It is an integral part of the virtual machine and is usually implemented in C. There is no ClassLoader object corresponding to the bootstrap class loader.
The extension class loader loads "standard extensions" from the jre /lib/ext directory. You can drop JAR files into that directory, and the extension class loader will find the classes in them, even without any class path.
The system class loader loads the application classes. It locates classes in the directories and JAR/ZIP files on the class path, as set by the CLASSPATH environment variable or the -classpath command-line option.
The Class Loader Hierarchy:
上一篇: Java学习笔记-Class Loaders 博客分类: Java学习笔记 JavaEXTCC++C#
下一篇: Java学习笔记-JDBC 1 博客分类: Java学习笔记 JDBCJavaMySQLSQLPostgreSQL
推荐阅读
-
Java学习笔记-JDBC 3 博客分类: Java学习笔记 JDBCJavaSQL
-
Java学习笔记-JDBC 1 博客分类: Java学习笔记 JDBCJavaMySQLSQLPostgreSQL
-
Java学习笔记-Class Loaders 博客分类: Java学习笔记 JavaEXTCC++C#
-
Java学习笔记-Class Loaders 博客分类: Java学习笔记 JavaEXTCC++C#
-
ActiveMQ学习笔记之四--启动嵌入式Broker(纯代码方式) 博客分类: java
-
java基础学习笔记一 博客分类: java Java正则表达式Bing金融Blog
-
已前的学习笔记java lesson 10 博客分类: java javamembervariablereference