日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Understanding Extension Class Loading--官方

發布時間:2025/4/5 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Understanding Extension Class Loading--官方 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

http://docs.spring.io/spring-amqp/docs/1.3.6.RELEASE/reference/html/sample-apps.html#d4e1285

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:

  • Bootstrap classes: the runtime classes in?rt.jar, internationalization classes in?i18n.jar, and others.
  • Installed extensions: classes in JAR files in the?lib/ext?directory of the JRE, and in the system-wide, platform-specific extension directory (such as?/usr/jdk/packages/lib/ext?on the Solaris? Operating System, but note that use of this directory applies only to Java? 6 and later).
  • The class path: classes, including classes in JAR files, on paths specified by the system property?java.class.path. If a JAR file on the class path has a manifest with the?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?CLASSPATHenvironment 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:

    • Constructors in?java.lang.ClassLoader?and its subclasses allow you to specify a parent when you instantiate a new class loader. If you don't explicitly specify a parent, the virtual machine's system class loader will be assigned as the default parent.
    • The?loadClass?method in?ClassLoader?performs these tasks, in order, when called to load a class:
    • If a class has already been loaded, it returns it.
    • Otherwise, it delegates the search for the new class to the parent class loader.
    • If the parent class loader does not find the class,?loadClass?calls the method?findClass?to find and load the class.
    • The?findClass?method of?ClassLoader?searches for the class in the current class loader if the class wasn't found by the parent class loader. You will probably want to override this method when you instantiate a class loader subclass in your application.
    • The class?java.net.URLClassLoader?serves as the basic class loader for extensions and other JAR files, overriding the?findClass?method of?java.lang.ClassLoader?to search one or more specified URLs for classes and resources.

    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.

    • In the?java?tool, the?-classpath?option is a shorthand way to set the?java.class.path?property.
    • The?-cp?and?-classpath?options are equivalent.
    • The?-jar?option runs applications that are packaged in JAR files. For a description and examples of this option, see the?Running JAR-Packaged Software?lesson in this tutorial。

    轉載于:https://www.cnblogs.com/davidwang456/p/4056290.html

    總結

    以上是生活随笔為你收集整理的Understanding Extension Class Loading--官方的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

    主站蜘蛛池模板: 中文文字幕一区二区三三 | 亚洲图片 欧美 | 欧美日韩高清在线播放 | 欧美高h视频 | 日韩精品电影在线观看 | 97理伦| 国内一级黄色片 | 国产r级在线 | 伊人网综合视频 | 九九国产精品视频 | 国产成人精品一区二 | 国产精品毛片va一区二区三区 | 天堂av网在线| 美女被猛网站 | 少妇高潮露脸国语对白 | 国产人妻大战黑人20p | 69一区二区 | 中文在线www | 精品久久久久久久久久久久久久久 | 久久久精品亚洲 | 人人插人人 | 涩涩小网站| 伊人98 | 国产日韩一区二区在线 | 亚洲AV成人无码久久精品同性 | 九色麻豆 | 操网 | 91视频二区 | 在线观看成年人视频 | www夜夜操| 日本视频网 | 精品午夜福利在线观看 | 国产av成人一区二区三区高清 | 五月婷婷激情视频 | 中国国产毛片 | 天狂传说之巴啦啦小魔仙 | 国产精品久久久久国产a级 国产一区二区在线播放 | 国产三级高清 | 日本高清网色 | 亚洲国产av一区二区三区 | 波多野结衣在线一区 | 精品人妻天天爽夜夜爽视频 | 三级一区二区 | 噼里啪啦国语电影 | 一区二区三区黄 | 欧美日韩制服 | 成人午夜视频在线播放 | 国产又粗又猛又黄又爽视频 | 久久大| 岛国av免费在线观看 | 99精品视频在线观看 | 亚洲天堂一区在线观看 | 国产伦理一区 | 日韩精品在线电影 | av五十路| 好吊色一区二区 | 电影《走路上学》免费 | 99视频免费观看 | 国产日韩欧美一区二区 | 啪啪网页 | 小宵虎南在线观看 | 日韩精彩视频 | 91超碰在 | 黑人玩弄人妻一区二区三区 | 日本不卡一区二区三区视频 | av大全免费 | 69久久久| 狠狠鲁视频 | 日本网站免费观看 | 国产免费久久精品国产传媒 | 亚洲热视频| 无码人妻精品一区二区蜜桃色欲 | 天天看片中文字幕 | 欧洲黄色录像 | 国产精品调教 | 秋霞影院午夜丰满少妇在线视频 | 一区二区xxx | 色播欧美 | 在线观看欧美一区二区 | 国产精品av在线 | 国产精品99久久久久久久久久久久 | 亚洲av少妇一区二区在线观看 | 五月婷综合网 | 视频在线观看一区 | 国产a一级片 | 久久一本综合 | 黄色一级一片 | 徐锦江一级淫片免费看 | 激情都市一区二区 | 天天爱夜夜操 | 久久男人| 色综合天天网 | 日本激情在线 | 夜夜嗨av禁果av粉嫩avhd | 男男车车的车车网站w98免费 | 自拍偷拍av| 二级黄色大片 | 在线看片你懂得 | 欧美精品久久久久久久久久 |