The configuration loader class Configurationloader loads the XML file that holds the star-related parameters from the specified path, reading the data to construct a list of the object and its associated rendered sub-objects and return. The class diagram for this class is shown below.The main methods that the
This image of the asynchronous loading and caching of the class has been used by many developers, is one of the most common open source libraries, the mainstream application, the random anti-compilation of several fire projects, can see its figure.But some people do not know how to use this library how to configure, the information found on the Internet may be too little for the people just contact, below I will use the process I know the written down
hereActive and passive references to classes1. Active and passive references to classes (initialization of classes must occur)L Objects of the new classL call static members of a class (except for final constants) and static methodsL Use the Java.lang.reflect package method to reflect and invoke a classWhen the virtual machine starts, the Java demo will initialize the demo class, starting with the
,
Therefore, each bundle can access classes located in the following locations:
A) All classes in the packages starting with Java. * located in the Java startup class path;
B) classes located in the osgi framework class path, usually have an independent class loader responsible for loading the implementation
Turn notesThis image of the asynchronous loading and caching of the class has been used by many developers, is one of the most common open source libraries, the mainstream application, the random anti-compilation of several fire projects, can see its figure.But some people do not know how to use this library how to configure, the information found on the Internet may be too little for the people just contact, below I will use the process I know the wr
:(1)./common Directory: The class library can be used by both the Tomcat server itself and all Web applications.(2)./server Directory: The class library can be used by the Tomcat server itself and is not visible to the application.(3)./shared Directory: The class library can be used by all applications and is not visible to the Tomcat server itself.(4)./webapp/we
Source: http://www.ibm.com/developerworks/cn/java/j-lo-classloader/The ClassLoader (class loader) is a very important concept in java™. The ClassLoader is responsible for loading the Java class's byte code into the Java virtual machine. In this paper, the basic concepts of Java ClassLoader are introduced in detail, including the proxy mode, the concrete process of loading
The following is from Zhou Zhiming's in-depth understanding of Java virtual machines.Learn the JEE specification, go to the JBoss source code, learn the class loader, to see the OSGi source code.OSGI, the Open Service Gateway Initiative, is a dynamic modular specification based on the Java language.Only the export package can be accessed by an external module.OSGi allows for module-level hot-swappable funct
bottom-up, and the custom ClassLoader to bootstrap ClassLoader-by-layer check, as long as a certain classloader is loaded as if the class has been loaded. Ensure that only all classloader of this class are loaded once. The order of loading is top-down, that is, the upper layer tries to load the class one at a level.Methodinterceptor interfaceInherit InterceptorI
It is well known that when accessing a variable or method of a class, if the class is not initialized, a class is initialized first.However, when the variable of this class is final, it is not necessarilyTake a look at the following examplePackage Com.lala.shop;import Java.util.random;public
inside") in the second project:
Import-package: org. osgi. Framework; version = "1.3.0 ",Org. teamlet. samepackage
5. Add a call
The START () method in the activator of org. teamlet. osgi. Test in the second project calls sameclass.Public void start (bundlecontext context) throws exception {
Sameclass SC = new sameclass ();
SC. toshow ();
}
6. Execute
7. Conclusion
If a bundle introduces the same package as an internal package, it uses the imported package instead of the internal package.
The
JDK default 3 kinds of loaders: the parent class loader for all ClassLoader bootstrap ClassLoader, which is part of the JVM, is written in C + +, and it loads java_home/jre/ Class libraries in the Lib directory, such as: Rt.jar into memory. Extension ClassLoader is a subclass of bootstrap ClassLoader that loads the class
48_test Analysis of an advanced problem of the Class Loader, 48 Loading
This is an experiment, source code link: http://pan.baidu.com/s/1c0ix9UK password: ssvd
1. Let tomcat load MyServlet
Http: // localhost: 8080/itcastweb/servlet/MyServlet
2. Let jvm load MyServlet
Export MyServlet. class to D: \ Program Files \ Java \ jdk1.8.0 \ jre \ lib \ ext \
This article describes the PHP class automatic loader implementation method. Share to everyone for your reference. Specifically as follows:
Here autoload can be compatible with the following formats:
Cache_file_jsonclass_xxx.phpxxx.class.phpxxx.php
The PHP code is as follows:
function __autoload ($className) {
$dirs =explode (' _ ', $className);
$fileName =array_pop ($dirs);
Print_r ($dirs);
$fi
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.