확장 클래스 로 딩 이해-공식
4700 단어 Class
http://docs.spring.io/spring-amqp/reference/html/index.html
http://docs.spring.io/spring-amqp/docs/1.4.0.M1/api/
원문:http://docs.oracle.com/javase/tutorial/ext/basics/load.html
The extension framework makes use of the class-loading delegation mechanism. When the runtime environment needs to load a new class for an application, it looks for the class in the following locations, in order:
Class-Path
attribute, JAR files specified by the Class-Path
attribute will be searched also. By default, the java.class.path
property's value is .
, the current directory. You can change the value by using the -classpath or -cp command-line options, or setting the CLASSPATH
environment variable. The command-line options override the setting of the CLASSPATH
environment variable. The precedence list tells you, for example, that the class path is searched only if a class to be loaded hasn't been found among the classes in rt.jar, i18n.jar or the installed extensions.
Unless your software instantiates its own class loaders for special purposes, you don't really need to know much more than to keep this precedence list in mind. In particular, you should be aware of any class name conflicts that might be present. For example, if you list a class on the class path, you'll get unexpected results if the runtime environment instead loads another class of the same name that it found in an installed extension.
The Java Class Loading Mechanism
The Java platform uses a delegation model for loading classes. The basic idea is that every class loader has a "parent" class loader. When loading a class, a class loader first "delegates" the search for the class to its parent class loader before attempting to find the class itself.
Here are some highlights of the class-loading API:
To see a sample application that uses some of the API as it relates to JAR files, see the Using JAR-related APIs lesson in this tutorial.
Class Loading and the java Command
The Java platform's class-loading mechanism is reflected in the java command.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Error configuring application listener of class org.springframework.web.context.ContextLoaderListeneSolution: 1. Copy org.springframework.web-3.0.5.RELEASE.jar to the WEB-INF/lib directory 2. Add in web.xml contextConfig...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.