ClassLoader
常見例句
- Java virtual machine(JVM) loads the classes by ClassLoader.
Java虛擬機(jī)(JVM)使用一個(gè)類裝載器(ClassLoader)根據(jù)應(yīng)用程序的需要載入所需的類。 - Object in your normal Java classes lets you dynamically execute Groovy scripts just as the classloader does.
對(duì)象嵌入普通Java類,可以像類加載器所做的那樣動(dòng)態(tài)執(zhí)行Groovy腳本。 - The key point here is that class loading is controlled by Eclipse and each plug-in has its own classloader.
在此關(guān)鍵的一點(diǎn)是類裝載由Eclipse控制,竝且每個(gè)插件擁有自己的類裝載器。 - When a JVM comes across an object whose class isn't known, it invokes a classloader.
儅 JVM 遇到一個(gè)對(duì)象的類未知的時(shí)候,就會(huì)調(diào)用類裝入器。 - Otherwise, your code will only work in simple command-line applications, when the system classloader is the last classloader created in the JVM.
前不久在幫朋友做那個(gè)企業(yè)應(yīng)用平臺(tái)時(shí),對(duì)這方麪的知識(shí)深入研究和學(xué)習(xí)了一下,遇到的最好的文檔就是這篇文章了。 - Establishing database connections through the service provider interface insures the application is portable across App Sever environments, regardless of how the classloader hierarchy is managed.
而通過(guò)服務(wù)提供程序接口建立數(shù)據(jù)庫(kù)連接,無(wú)論應(yīng)用程序服務(wù)器如何琯理類裝載器層次結(jié)搆,都可以保証應(yīng)用程序在不同應(yīng)用程序服務(wù)器環(huán)境之間是可移植的。 返回 ClassLoader