Java Àà×°ÈëÆ÷ÔÀí
תÔØ×Ôhttp://blog.csdn.net/yuekun1172006/archive/2007/06/02/1634878.aspx
Àà×°ÈëÆ÷ÊÇ JVM ÓÃÀ´×°ÈëÀàµÄÀ࣬Ëü¶ÔÓÚ Java ±à³ÌÊǷdz£ÖØÒªµÄÒ»¸ö¸ÅÄî¡£Ò»°ãÇé¿öÏ£¬³ÌÐòÔ±ÔÚ±àд³ÌÐòµÄʱºò¶¼¿ÉÒÔºöÂÔÀà×°ÈëÆ÷µÄ´æÔÚÐÔ¡£µ«ÊǶÔÓÚ·þÎñÆ÷¶Ë±à³Ì»òÕßÊÇһЩÌØÊâÇé¿öÏÂʱºò£¬ÉîÈëÁ˽âÀà×°ÈëÆ÷µÄ»úÖÆÒÔ¼°ÆäÔÚ²»Í¬Çé¿öϵÄʵÏÖ»¹ÊǷdz£±ØÒªµÄ¡£
Ê×ÏÈ£¬µ±Ò»¸ö JVM Æô¶¯µÄʱºò£¬Java ȱʡ¿ªÊ¼Ê¹ÓÃÈý¸öÀà×°ÈëÆ÷¡£ËüÃÇ·Ö±ðÊÇ£º
Òýµ¼£¨Bootstrap£©Àà×°ÈëÆ÷£»
À©Õ¹£¨Extension£©Àà×°ÈëÆ÷£»
ϵͳ£¨System£©Àà×°ÈëÆ÷£»
ËüÃÇ·Ö±ðʵÏÖÈçÏµĹ¦ÄÜ£º
Òýµ¼Àà×°ÈëÆ÷ÊÇÓñ¾µØ´úÂëʵÏÖµÄÀà×°ÈëÆ÷¡£Ëü¸ºÔ𽫠<Java_Runtime_Home>/lib
ÏÂÃæµÄÀà¿â¼ÓÔص½ÄÚ´æÖС£
À©Õ¹Àà×°ÈëÆ÷ÊÇÓÉ Sun µÄ ExtClassLoader ʵÏֵġ£Ëü¸ºÔ𽫠< Java_Runtime_Home >/lib/ext
»òÕßÓÉϵͳ±äÁ¿ java.ext.dir Ö¸¶¨Î»ÖÃÖеÄÀà¿â¼ÓÔص½ÄÚ´æÖС£
ϵͳÀà×°ÈëÆ÷ÓÖ½ÐÓ¦ÓóÌÐòÀà×°ÈëÆ÷£¬ÊÇÓÉ Sun µÄ AppClassLoader ʵÏֵġ£Ëü¸ºÔð½«ÏµÍ³Àà·¾¶£¨CLASSPATH£©ÖÐÖ¸¶¨µÄÀà¿â¼ÓÔص½ÄÚ´æÖС£
µ±
Ó¦ÓóÌÐòÐèÒª¼ÓÔØij¸öÀൽÄÚ´æÖеÄʱºò£¬Àà×°ÈëÆ÷ÊÇÈçºÎ¹¤×÷µÄÄØ£¿Õâ¾ÍÉè¼Æµ½Àà×°ÈëÆ÷µÄÒ»¸öÖØÒª·½Ã棺´úÀí»úÖÆ¡£Ã¿Ò»¸öÀà×°ÈëÆ÷£¬³ýÁËÒýµ¼Àà×°ÈëÆ÷ÒÔÍ⣬
¶¼ÓÐÒ»¸ö¸¸Àà×°ÈëÆ÷¡£¶ÔÓÚϵͳȱʡ¶¨ÒåµÄÈý¸öÀà×°ÈëÆ÷£¬Òýµ¼Àà×°ÈëÆ÷ÊÇÀ©Õ¹Àà×°ÈëÆ÷µÄ¸¸Àà×°ÈëÆ÷£¬¶øÀ©Õ¹Àà×°ÈëÆ÷ÊÇϵͳÀà×°ÈëÆ÷µÄ¸¸Àà×°ÈëÆ÷¡£µ±È»£¬Ó¦ÓÃ
³ÌÐòÒ²¿ÉÒÔʹÓÃ×Ô¼ºµÄÀà×°ÈëÆ÷À´Ê¹ÓÃÌض¨µÄ·½·¨À´×°ÔØÀ࣬Òò´Ë£¬Õû¸öϵͳÖеÄÀà×°ÈëÆ÷¾ÍÐγÉÒ»¸öÊ÷×´½á¹¹¡£
µ±Ê¹ÓÃij¸öÀà×°ÈëÆ÷À´ÊÔͼװÔØij¸öÀàµÄʱºò£¬¸ÃÀà×°ÈëÆ÷»áÊ×ÏÈʹÓÃÆ丸Àà×°ÈëÆ÷À´ÊÔͼװÔظÃÀà¡£¶ÔÓÚÿһ¸ö×°ÔؽøÀ´µÄÀ࣬JVM ¶¼»á¸øÆä·ÖÅäÒ»¸öΨһµÄ ID¡£Òò´Ë£¬²»Í¬Àà×°ÈëÆ÷¿ÉÒÔ×°ÔØͬһ¸öÀൽ JVM ÖС£ÀýÈ磬¶ÔÓÚÈçÏÂͼ½á¹¹µÄ ClassLoaderA
ºÍ ClassLoaderB
£º
ͼ 1 Àà×°ÈëÆ÷µÄ½á¹¹
¼ÙÉèÀà C
ÔÚϵͳÀà×°ÈëÆ÷Ö¸¶¨µÄÀà·¾¶ÖУ¬ÔòÎÞÂÛÊÇʹÓà ClassLoaderA
»¹ÊÇʹÓà ClassLoaderB
£¬¶¼Ö»»áµÃµ½Í¬ÑùÒ»¸öÀà C
¡£
µ«ÊÇÈç¹ûÀà C
·Ö±ðÔÚ ClassLoaderA
ÒÔ¼° ClassLoaderB
Ö¸¶¨µÄÀà¿âÖУ¬ÔòʹÓà ClassLoaderA
µÃµ½µ½Àà C
ʵÀý»á²»Í¬ÓÚ ClassLoaderB
µÃµ½µÄÀà C
ʵÀý¡£¾¡¹ÜÁ½¸öÀà×°ÈëÆ÷ÔÚͬһ¸ö JVM ÖС£
ÉÏÃæµÄÀà×°ÈëÆ÷µÄÏòÉÏ´úÀí½á¹¹¿´ÉÏÈ¥ºÜÍêÃÀÁË£¬µ«ÊÇ£¬µ±ÏµÍ³±äµÃ¸´ÔÓµÄʱºò£¬¾Í»¹ÊÇÏԵò»¹»ÓÃÁË¡£
Ïà¹ØÎĵµ£º
Java
鍼뱎˜
MC
ËùÓÐ
ITEM
1
¡¢
mc
±éÀú
item
ÔÀí
Mc
±éÀú
item
Óõ½µÄÃüÁîÓÐÈý¸ö£º
stats items
£¬
stats cachedump, get
¡£Í¨¹ý
telnet
³ÌÐò
telnet
µ½
mc
·þÎñÆ÷ÉÏ£¨
telnet ip
µØÖ·
¶Ë¿ÚºÅ£¬Èç
telnet 192.168.0.1 11211
£©£¬ÒÀ´ÎÖ ......
import java.util.*;
public class ForeachExample {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Random r = new Random();
int[] x = new int[10];
for (int i = 0; i < x.length; i++) {
x[i] = r.nextInt(100);
}
/ ......
ÏÖÔÚ£¬Ì¸ÔƼÆËãµÄ¿É¶àÁË£¬²»¹ý£¬Ò»°ã±È½Ï¹Ø×¢µÄÊÇGoogleºÍAmazonµÄÔÆ·þÎñ¡£´Ó´ó·¶Î§À´¿´£¬Ò²Ö»ÓÐÕâÁ½¼Ò»ñµÃÁ˹«Öڵĸü¶à¹Ø×¢¡£±ÈÈ磬ÎÒ¸öÈ˺ܸÐÐËȤµÄ£¬¾ÍÊÇGoogleµÄApp EngineʹÓû§Äܹ»ÔÚGoogle»ù´¡ÉèÊ©ÉϹ¹½¨ºÍÍÐ¹Ü Web Ó¦ÓóÌÐò¡£ÖÁÓÚAmazon£¬ËüµÄAmazonWeb Services»¹°üÀ¨Elastic Cloud Compute (EC2)¼ÆËãWeb·þ ......
ʼþÔ´¸ºÔð²úÉúʼþ
ʼþÀࣺ¶¨ÒåʼþµÄÌØÕ÷£»
¼àÌýÆ÷½Ó¿Ú£º¶¨Òå¼àÌýÆ÷Ó¦¸ÃʵÏֵŦÄÜ£»
¼àÌýÆ÷£ºÊµÏÖ¼àÌýÆ÷½Ó¿Ú£¬¼àÌýʼþµÄ·¢Éú²¢×÷³öÏìÓ¦£»
ËùÓеÄʼþÀà±ØÐë¼Ì³ÐJavaʼþ»ùÀ࣬¼´java.util.EventObject£»EventObject(Object source)ÊÇEventObjectΨһµÄ¹¹Ôì·½·¨£¬ÕâÒâζ×ÅËùÓÐʼþ±ØÐëÔÚʵÀý»¯Ê±¾ÍÖ¸¶¨Ê¼þÔ´ ......