javaÖеÄClassLoader
ClassLoaderÒ»¸ö¾³£³öÏÖÓÖÈúܶàÈËÍû¶øÈ´²½µÄ´Ê£¬±¾ÎĽ«ÊÔͼÒÔ×îdzÏÔÒ׶®µÄ·½Ê½À´½²½â ClassLoader£¬Ï£ÍûÄܶԲ»Á˽â¸Ã»úÖƵÄÅóÓÑÆðµ½Ò»µãµã×÷Óá£
ÒªÉîÈëÁ˽âClassLoader£¬Ê×ÏȾÍÒªÖªµÀClassLoaderÊÇÓÃÀ´¸ÉʲôµÄ£¬¹ËÃû˼Ò壬Ëü¾ÍÊÇÓÃÀ´¼ÓÔØClassÎļþµ½JVM£¬ÒÔ¹©³ÌÐòʹÓõġ£ÎÒÃÇÖªµÀ£¬java³ÌÐò¿ÉÒÔ¶¯Ì¬¼ÓÔØÀඨÒ壬¶øÕâ¸ö¶¯Ì¬¼ÓÔصĻúÖƾÍÊÇͨ¹ýClassLoaderÀ´ÊµÏֵģ¬ËùÒÔ¿ÉÏë¶øÖªClassLoaderµÄÖØÒªÐÔÈçºÎ¡£
¿´µ½ÕâÀ¿ÉÄÜÓеÄÅóÓÑ»áÏëµ½Ò»¸öÎÊÌ⣬ÄǾÍÊǼÈÈ»ClassLoaderÊÇÓÃÀ´¼ÓÔØÀൽJVMÖеģ¬ÄÇôClassLoaderÓÖÊÇÈçºÎ±»¼ÓÔØÄØ£¿ÄѵÀËü²»ÊÇjavaµÄÀࣿ
ûÓÐ´í£¬ÔÚÕâÀïȷʵÓÐÒ»¸öClassLoader²»ÊÇÓÃjavaÓïÑÔËù±àдµÄ£¬¶øÊÇJVMʵÏÖµÄÒ»²¿·Ö£¬Õâ¸öClassLoader¾ÍÊÇbootstrap classloader£¨Æô¶¯Àà¼ÓÔØÆ÷£©£¬Õâ¸öClassLoaderÔÚJVMÔËÐеÄʱºò¼ÓÔØjavaºËÐĵÄAPIÒÔÂú×ãjava³ÌÐò×î»ù±¾µÄÐèÇó£¬ÆäÖоͰüÀ¨Óû§¶¨ÒåµÄClassLoader£¬ÕâÀïËùνµÄÓû§¶¨ÒåÊÇָͨ¹ýjava³ÌÐòʵÏÖµÄClassLoader£¬Ò»¸öÊÇExtClassLoader£¬Õâ¸öClassLoaderÊÇÓÃÀ´¼ÓÔØjavaµÄÀ©Õ¹APIµÄ£¬Ò²¾ÍÊÇ/lib/extÖеÄÀ࣬һ¸öÊÇAppClassLoader£¬Õâ¸öClassLoaderÊÇÓÃÀ´¼ÓÔØÓû§»úÆ÷ÉÏCLASSPATHÉèÖÃĿ¼ÖеÄClassµÄ£¬Í¨³£ÔÚûÓÐÖ¸¶¨ClassLoaderµÄÇé¿öÏ£¬³ÌÐòÔ±×Ô¶¨ÒåµÄÀà¾ÍÓɸÃClassLoader½øÐмÓÔØ¡£
µ±ÔËÐÐÒ»¸ö³ÌÐòµÄʱºò£¬JVMÆô¶¯£¬ÔËÐÐbootstrap classloader£¬¸ÃClassLoader¼ÓÔØjavaºËÐÄAPI£¨ExtClassLoaderºÍAppClassLoaderÒ²ÔÚ´Ëʱ±»¼ÓÔØ£©£¬È»ºóµ÷ÓÃExtClassLoader¼ÓÔØÀ©Õ¹API£¬×îºóAppClassLoader¼ÓÔØCLASSPATHĿ¼Ï¶¨ÒåµÄClass£¬Õâ¾ÍÊÇÒ»¸ö³ÌÐò×î»ù±¾µÄ¼ÓÔØÁ÷³Ì¡£
ÉÏÃæ´ó¸Å½²½âÁËÒ»ÏÂClassLoaderµÄ×÷ÓÃÒÔ¼°Ò»¸ö×î»ù±¾µÄ¼ÓÔØÁ÷³Ì£¬½ÓÏÂÀ´½«½²½âÒ»ÏÂClassLoader¼ÓÔصķ½Ê½£¬ÕâÀï¾Í²»µÃ²»½²Ò»ÏÂClassLoaderÔÚÕâÀïʹÓÃÁËË«Ç×ίÍÐģʽ½øÐÐÀà¼ÓÔØ¡£
ÿһ¸ö×Ô¶¨ÒåClassLoader¶¼±ØÐë¼Ì³ÐClassLoaderÕâ¸ö³éÏóÀ࣬¶øÿ¸öClassLoader¶¼»áÓÐÒ»¸öparent ClassLoader£¬ÎÒÃÇ¿ÉÒÔ¿´Ò»ÏÂClassLoaderÕâ¸ö³éÏóÀàÖÐÓÐÒ»¸ögetParent()·½·¨£¬Õâ¸ö·½·¨ÓÃÀ´·µ»Øµ±Ç°ClassLoaderµÄparent£¬×¢Ò⣬Õâ¸öparent²»ÊÇÖ¸µÄ±»¼Ì³ÐµÄÀ࣬¶øÊÇÔÚʵÀý»¯¸ÃClassLoaderʱָ¶¨µÄÒ»¸öClassLoader£¬Èç¹ûÕâ¸öparentΪnull£¬ÄÇô¾ÍĬÈϸÃClassLoaderµÄparentÊÇbootstrap classloader£¬Õâ¸öparentÓÐʲôÓÃÄØ£¿
ÎÒÃÇ¿ÉÒÔ¿¼ÂÇÕâÑùÒ»ÖÖÇé¿ö£¬¼ÙÉèÎÒÃÇ×Ô¶¨ÒåÁËÒ»¸öClientDefClassLoader£¬ÎÒÃÇʹÓÃÕâ¸ö×Ô¶¨ÒåµÄClassLoader¼ÓÔØjava
Ïà¹ØÎĵµ£º
×¢£º±¾ÎÄת×Ôhttp://lavasoft.blog.51cto.com µÄJavaÐéÄâ»ú£¨JVM£©²ÎÊýÅäÖÃ˵Ã÷£¬×÷Ϊ×Ô¼ºÑ§Ï°Óá£
JavaÐéÄâ»ú£¨JVM£©²ÎÊýÅäÖÃ˵Ã÷
ÔÚJava¡¢J2EE´óÐÍÓ¦ÓÃÖУ¬JVM·Ç±ê×¼²ÎÊýµÄÅäÖÃÖ±½Ó¹Øϵµ½Õû¸öϵͳµÄÐÔÄÜ¡£
JVM·Ç±ê×¼²ÎÊýÖ¸µÄÊÇJVMµ×²ãµÄһЩÅäÖòÎÊý£¬ÕâЩ²ÎÊýÔÚÒ»°ã¿ª·¢ÖÐĬÈϼ´¿É£¬²»ÐèÒªÈκÎÅäÖᣵ«ÊÇÔÚÉú ......
´ó¼ÒºÃ£¬Çë°´ÕÕÏÂͼ¸ñʽÌîдÄãµÄ¼òÀú£¬·¢Ë͵½Óʼþ loveyingjiaping@126.com
¹«Ë¾×ܲ¿ÔÚº¼ÖÝÎ÷ºþ¿Æ¼¼Ô°¸½½ü£¬¸£Àû´ýÓöºÃ£¬ÎåÏÕÒ»½ð£¬
²¹Ìù£º·¹Ìù¡¢½»Í¨·Ñ¡¢Í¨Ñ¶·Ñ¡¢ÄêÖÕ½±¡¢¹ý½Ú·Ñ……
±±¾©·Ö¹«Ë¾¼¼Êõ²¿¾Àí£¨¸±¾Àí£©¸ÚλְÔðºÍÈÎÖ°Ìõ¼þÈçÏ£º
n ¸ÚλְÔð£º
1. & ......
Ê×Ïȵ½¸Ãhttp://ostermiller.org/utils/download.html µØÖ·ÏÂÔØcom.Ostermiller.util cvsµÄjar°ü¡£
public class CsvFileParser{
private LabeledCSVParser csvParser;//csv½âÎöÆ÷£¬¶ÔÓÚµÚÒ»ÐеıíÍ·ÐÅÏ¢£¬×Ô¶¯¼ÓÔØΪË÷Òý¹Ø¼ü×Ö
private int currLineNum = -1;//ÎļþËù¶Áµ½ÐÐÊý
private String[] currLi ......
java´ò°ü-exeÎļþ-×îÖÕÒÔsetupÐÎʽ·¢²¼µÄ½â¾öÖ®µÀ
java´ò°ü-exeÎļþ-×îÖÕÒÔsetupÐÎʽ·¢²¼µÄ½â¾öÖ®µÀ
Ê×ÏÈ£¬½«±àÒëºÃµÄ³ÌÐò´ò°ü³ÉjarÎļþ£¬È»ºó×ö³öexe£¬ÕâÑù´úÂë¾Í²»¿É¼ûÁË£»µ«ÊÇexeÎļþÔÚûÓа²×°jreµÄµçÄÔÉϲ»ÄÜÔËÐУ¬Èç¹ûÒªÇó¿Í»§ÔÙÈ¥°²×°jre ÉèÖû·¾³±äÁ¿ ¾Í²»ÑÅÁË¡£ÎÒÃÇÐèÒª½«jre´ò°ü¡£
Õ⼸²½²Ù×÷Í ......