锘??xml version="1.0" encoding="utf-8" standalone="yes"?>精品国产91乱码一区二区三区,亚洲aaa精品,日韩一二三区http://www.aygfsteel.com/agapple/category/35421.htmlzh-cnTue, 02 Nov 2010 12:35:28 GMTTue, 02 Nov 2010 12:35:28 GMT60linux涓媕ava紿楀彛錛屾紜樉紺轟腑鏂?http://www.aygfsteel.com/agapple/archive/2008/10/31/237838.htmlagappleagappleFri, 31 Oct 2008 08:31:00 GMThttp://www.aygfsteel.com/agapple/archive/2008/10/31/237838.htmlhttp://www.aygfsteel.com/agapple/comments/237838.htmlhttp://www.aygfsteel.com/agapple/archive/2008/10/31/237838.html#Feedback0http://www.aygfsteel.com/agapple/comments/commentRss/237838.htmlhttp://www.aygfsteel.com/agapple/services/trackbacks/237838.htmlTip1

1.鍦?JAVA_HOME/jre/lib/fonts/ 涓嬪緩绔嬩釜鐩綍 fallback
2.鍦?fallback 閲屽紕涓腑鏂囧瓧浣撴渶綆€鍗昹n涓€涓嬪氨濂戒簡
姣斿錛?/p>

ln -s /usr/share/fonts/truetype/arphic/uming.ttf  $JAVA_HOME/jre/lib/fonts/fallback/

Tip2

闂鎻忚堪錛欽ava 搴旂敤紼嬪簭鐨勪腑鏂囨棤娉曟樉紺猴紝鍛堢幇鏂瑰潡鐘躲€?/p>

銆€銆€鍘熷洜鍒嗘瀽錛欽ava 搴旂敤紼嬪簭鏃犳硶鎵懼埌鍙緵鏄劇ず涓枃鐨勫瓧浣撱€?/p>

銆€銆€瑙e喅鏂規(guī)錛氶鍏堬紝紜繚緋葷粺閲屽畨瑁呬簡 JDK 1.5.0_06錛屽鏋滃畨瑁呯殑鏄?JRE 1.5.0_06錛岄偅涔堝嵏鎺?JRE錛屽啀瀹夎 JDK銆傜劧鍚庝笅杞?fireflysung 1.3.0錛?瑙e帇鍚庡皢鍏朵腑鐨?ttf 鏂囦歡涓㈠埌緋葷粺瀛椾綋鐩綍/usr/share/fonts錛屽啀鐢?fc-cache -f -v 璺戜竴閬嶏紝璁╃郴緇熺煡閬撹繖涓瓧浣撱€傛渶鍚庯紝灝辨槸杞埌 JDK 瀹夎鐩綍鐨刯re/lib/fonts 涓紝浣跨敤涓嬮潰鐨勫懡浠ゆ潵瀹屾垚銆?/p>

銆€銆€mkdir fallback
銆€銆€cd fallback
銆€銆€ln -s /usr/share/fonts/fireflysung.ttf
銆€銆€mkfontdir
銆€銆€mkfontscale


agapple 2008-10-31 16:31 鍙戣〃璇勮
]]>
jar鍖呯殑service Provider鏈哄埗http://www.aygfsteel.com/agapple/archive/2008/10/31/237770.htmlagappleagappleFri, 31 Oct 2008 03:32:00 GMThttp://www.aygfsteel.com/agapple/archive/2008/10/31/237770.htmlhttp://www.aygfsteel.com/agapple/comments/237770.htmlhttp://www.aygfsteel.com/agapple/archive/2008/10/31/237770.html#Feedback0http://www.aygfsteel.com/agapple/comments/commentRss/237770.htmlhttp://www.aygfsteel.com/agapple/services/trackbacks/237770.html瀹樻柟鎻忚堪錛歨ttp://java.sun.com/j2se/1.3/docs/guide/jar/jar.html

The META-INF directory

The following files/directories in the META-INF directory are recognized and interpreted by the Java 2 Platform to configure applications, extensions, class loaders and services:
  • MANIFEST.MF
The manifest file that is used to define extension and package related data.
  • INDEX.LIST
This file is generated by the new "-i" option of the jar tool, which contains location information for packages defined in an application or extension.  It is part of the JarIndex implementation and used by class loaders to speed up their class loading process.
  • x.SF
The signature file for the JAR file.  'x' stands for the base file name.
  • x.DSA
The signature block file associated with the signature file with the same base file name. This file stores the digital signature of the corresponding signature file.
  • services/
This directory stores all the service provider configuration files.

榪欓噷鎸囧嚭浜唈ar鍖呯殑鍏稿瀷鐨勭洰褰曠粨鏋勩€傜畝鍗曠炕璇?

META-INF鐩綍涓殑涓嬪垪鏂囦歡鍜岀洰褰曡幏寰桱ava 2騫沖彴鐨勮鍙笌瑙i噴錛岀敤鏉ラ厤緗簲鐢ㄧ▼搴忋€佹墿灞曠▼搴忋€佺被鍔犺澆鍣ㄥ拰鏈嶅姟錛?br /> • MANIFEST.MF錛氭竻鍗曟枃浠訛紝鐢ㄦ潵瀹氫箟涓庢墿灞曞拰鏁版嵁鍖呯浉鍏崇殑鏁版嵁銆?
• INDEX.LIST錛氳繖涓枃浠剁敱JAR宸ュ叿鐨勬柊“-i”閫夐」鐢熸垚錛屽叾涓寘鍚湪涓€涓簲鐢ㄧ▼搴忔垨鎵╁睍涓畾涔夌殑鏁版嵁鍖呯殑鍦板潃淇℃伅銆傚畠鏄疛arIndex鐨勪竴閮ㄥ垎錛岃綾誨姞杞藉櫒鐢ㄦ潵鍔犻€熺被鍔犺澆榪囩▼銆?
• x.SF錛欽AR鏂囦歡鐨勭鍚嶆枃浠躲€倄浠h〃鍩虹鏂囦歡鍚嶃€?
• x.DSA錛氳繖涓鍚嶅潡鏂囦歡涓庡悓鍚嶅熀紜€絳懼悕鏂囦歡鏈夊叧銆傛鏂囦歡瀛樺偍瀵瑰簲絳懼悕鏂囦歡鐨勬暟瀛楃鍚嶃€?
• services/錛氳繖涓洰褰曞瓨鍌ㄦ墍鏈夋湇鍔℃彁渚涚▼搴忛厤緗枃浠躲€?

Service Provider

Overview

Files in the META-INF/services directory are service provider configuration files. A service is a well-known set of interfaces and (usually abstract) classes. A service provider is a specific implementation of a service. The classes in a provider typically implement the interfaces and subclass the classes defined in the service itself. Service providers may be installed in an implementation of the Java platform in the form of extensions, that is, jar files placed into any of the usual extension directories. Providers may also be made available by adding them to the applet or application class path or by some other platform-specific means.

A service is represented by an abstract class. A provider of a given service contains one or more concrete classes that extend this service class with data and code specific to the provider. This provider class will typically not be the entire provider itself but rather a proxy that contains enough information to decide whether the provider is able to satisfy a particular request together with code that can create the actual provider on demand. The details of provider classes tend to be highly service-specific; no single class or interface could possibly unify them, so no such class has been defined. The only requirement enforced here is that provider classes must have a zero-argument constructor so that they may be instantiated during lookup.
 

Provider-Configuration File

A service provider identifies itself by placing a provider-configuration file in the resource directory META-INF/services. The file's name should consist of the fully-qualified name of the abstract service class. The file should contain a newline-separated list of unique concrete provider-class names. Space and tab characters, as well as blank lines, are ignored. The comment character is '#' (0x23); on each line all characters following the first comment character are ignored. The file must be encoded in UTF-8.
 

Example

Suppose we have a service class named java.io.spi.CharCodec. It has two abstract methods:

    public abstract CharEncoder getEncoder(String encodingName);
  public abstract CharDecoder getDecoder(String encodingName);

Each method returns an appropriate object or null if it cannot translate the given encoding. Typical CharCodec providers will support more than one encoding.

If sun.io.StandardCodec is a provider of the CharCodec service then its jar file would contain the file META-INF/services/java.io.spi.CharCodec. This file would contain the single line:

   sun.io.StandardCodec    # Standard codecs for the platform

To locate an encoder for a given encoding name, the internal I/O code would do something like this:

   CharEncoder getEncoder(String encodingName) {
       Iterator ps = Service.providers(CharCodec.class);
       while (ps.hasNext()) {
           CharCodec cc = (CharCodec)ps.next();
           CharEncoder ce = cc.getEncoder(encodingName);
           if (ce != null)
               return ce;
       }
       return null;
   }
 

The provider-lookup mechanism always executes in the security context of the caller. Trusted system code should typically invoke the methods in this class from within a privileged security context.


浠嬬粛錛?/p>

鍦∕ETA-INF/services鐩綍涓嬩繚瀛樼殑鏄痵ervice provider鐨勯厤緗枃浠躲€?鏈嶅姟鍦ㄥ簲鐢ㄤ腑浼?xì)鏄竴涓帴鍙?鏇村鐨勬槸鎶借薄綾?銆?br /> 涓€涓被鏈嶅姟鍣ㄦ彁渚涜€呭疄鐜頒簡涓€涓湇鍔$被銆傝繖綾葷殑鏈嶅姟鎻愪緵綾誨彲浠ヤ互鎵╁睍鐨勫艦寮忓彂甯冨埌騫沖彴涓娿€傛墍浠ワ紝jar鏂囦歡寮曞叆浜嗘墿灞曠洰褰曪紝鍚屾牱浣犱篃鍙互灝嗘湇鍔℃彁渚涜€呭姞鍏lasspath鎻愪緵璁塊棶銆?/p>

鏈嶅姟閮芥槸琛ㄧ幇涓轟竴涓Н绱紝鑰屼竴涓湇鍔℃彁渚涜€呴€氬父鏄泦鎴愭垨瀹炵幇浜嗘湇鍔″畾涔夌被銆傛湇鍔℃彁渚涚被閫氬父涓嶄細(xì)鍍忎唬鐞嗙被涓€鏍蜂負(fù)浜嗘甯告彁渚涙湇鍔¤€屽寘鍚簡璇鋒眰鑰呯殑璁稿淇℃伅銆傛湇鍔℃彁渚涚被涓€鑸€懼悜浜庨珮闆嗘垚銆?br /> 瀵硅繖綾繪湇鍔℃彁渚涚被鐨勫敮涓€寮哄埗鎬ц姹傚氨鏄繀欏繪湁涓€涓棤鍙傜殑鏋勯€犲嚱鏁般€?/p>

provider 閰嶇疆鏂囦歡
META-INF/services鐩綍浣滀負(fù)provider閰嶇疆鏂囦歡鐨勫瓨鏀捐礬寰勩€俻rovider閰嶇疆鏂囦歡涓繀欏繪槸鍏ㄧ被鍚?鍖呭惈package)銆傞厤緗枃浠跺彲浠ュ瓨鍦╯pace tab 鎹㈣絳夊瓧絎?#浣滀負(fù)娉ㄩ噴銆?br /> 娉ㄦ剰錛歱rovider閰嶇疆鏂囦歡蹇呴』鏄互UTF-8緙栫爜銆?/p>

 


鎬葷粨錛?br />       service provider鏈哄埗涓虹▼搴忕殑鍔ㄦ€佹墿灞曟彁渚涗簡濂戞満錛屽湪搴旂敤涓綘鍙互閽堝鎺ュ彛緙栫▼錛岄€氳繃RTTI鎶€鏈彲浠ユ瘮杈冨畬緹庣殑瑙e喅紼嬪簭涔嬮棿鐨勮€﹀悎鎬с€傜浉姣斾簬spring DIP鏈哄埗錛岃繖涔熸槸涓€涓笉閿欑殑灝濊瘯錛岃嚦灝戝畠涓嶉渶瑕佽€﹀悎spring鍖呫€?

agapple 2008-10-31 11:32 鍙戣〃璇勮
]]>
tomact classloader鏈哄埗http://www.aygfsteel.com/agapple/archive/2008/10/29/237424.htmlagappleagappleWed, 29 Oct 2008 09:45:00 GMThttp://www.aygfsteel.com/agapple/archive/2008/10/29/237424.htmlhttp://www.aygfsteel.com/agapple/comments/237424.htmlhttp://www.aygfsteel.com/agapple/archive/2008/10/29/237424.html#Feedback0http://www.aygfsteel.com/agapple/comments/commentRss/237424.htmlhttp://www.aygfsteel.com/agapple/services/trackbacks/237424.html闃呰鍏ㄦ枃

agapple 2008-10-29 17:45 鍙戣〃璇勮
]]>
jboss classloader鏈哄埗浠ュ強scope閰嶇疆http://www.aygfsteel.com/agapple/archive/2008/10/23/236142.htmlagappleagappleThu, 23 Oct 2008 06:08:00 GMThttp://www.aygfsteel.com/agapple/archive/2008/10/23/236142.htmlhttp://www.aygfsteel.com/agapple/comments/236142.htmlhttp://www.aygfsteel.com/agapple/archive/2008/10/23/236142.html#Feedback0http://www.aygfsteel.com/agapple/comments/commentRss/236142.htmlhttp://www.aygfsteel.com/agapple/services/trackbacks/236142.html闃呰鍏ㄦ枃

agapple 2008-10-23 14:08 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 贵溪市| 绩溪县| 满洲里市| 辉南县| 博野县| 大埔区| 南漳县| 葵青区| 白山市| 永城市| 湄潭县| 洪洞县| 库伦旗| 桦川县| 辉县市| 潮安县| 隆子县| 吴堡县| 横山县| 新闻| 武清区| 丰原市| 丹巴县| 邵阳市| 济南市| 乌兰浩特市| 会东县| 兖州市| 南丹县| 延津县| 谢通门县| 桐梓县| 灵丘县| 陆丰市| 土默特右旗| 凯里市| 镇原县| 芦溪县| 南澳县| 拉孜县| 白朗县|