java ClassLoader
µ±JVM£¨JavaÐéÄâ»ú£©Æô¶¯Ê±£¬»áÐγÉÓÉÈý¸öÀà¼ÓÔØÆ÷×é³ÉµÄ³õʼÀà¼ÓÔØÆ÷²ã´Î½á¹¹£º
bootstrap classloader
|
extension classloader
|
system classloader
bootstrap classloader
£Òýµ¼£¨Ò²³ÆΪÔʼ£©Àà¼ÓÔØÆ÷£¬Ëü¸ºÔð¼ÓÔØJavaµÄºËÐÄÀà¡£ÔÚSunµÄJVMÖУ¬ÔÚÖ´ÐÐjavaµÄÃüÁîÖÐʹÓÃ-XbootclasspathÑ¡Ïî»òʹÓÃ
- DÑ¡ÏîÖ¸¶¨sun.boot.class.pathϵͳÊôÐÔÖµ¿ÉÒÔÖ¸¶¨¸½¼ÓµÄÀà¡£Õâ¸ö¼ÓÔØÆ÷µÄÊǷdz£ÌØÊâµÄ£¬Ëüʵ¼ÊÉϲ»ÊÇ
java.lang.ClassLoaderµÄ×ÓÀ࣬¶øÊÇÓÉJVM×ÔÉíʵÏֵġ£´ó¼Ò¿ÉÒÔͨ¹ýÖ´ÐÐÒÔÏ´úÂëÀ´»ñµÃbootstrap
classloader¼ÓÔØÁËÄÇЩºËÐÄÀà¿â£º
URL[] urls = sun.misc.Launcher.getBootstrapClassPath().getURLs();
for (int i = 0; i < urls.length; i++) {
System.out.println(urls[i].toExternalForm());
}
ÔÚÎҵļÆËã»úÉϵĽá¹ûΪ£º
Îļþ:/C:/j2sdk1.4.1_01/jre/lib/endorsed/dom.jar
Îļþ:/C:/j2sdk1.4.1_01/jre/lib/endorsed/sax.jar
Îļþ:/C:/j2sdk1.4.1_01/jre/lib/endorsed/xalan-2.3.1.jar
Îļþ:/C:/j2sdk1.4.1_01/jre/lib/endorsed/xercesImpl-2.0.0.jar
Îļþ:/C:/j2sdk1.4.1_01/jre/lib/endorsed/xml-apis.jar
Îļþ:/C:/j2sdk1.4.1_01/jre/lib/endorsed/xsltc.jar
Îļþ:/C:/j2sdk1.4.1_01/jre/lib/rt.jar
Îļþ:/C:/j2sdk1.4.1_01/jre/lib/i18n.jar
Îļþ:/C:/j2sdk1.4.1_01/jre/lib/sunrsasign.jar
Îļþ:/C:/j2sdk1.4.1_01/jre/lib/jsse.jar
Îļþ:/C:/j2sdk1.4.1_01/jre/lib/jce.jar
Îļþ:/C:/j2sdk1.4.1_01/jre/lib/charsets.jar
Îļþ:/C:/j2sdk1.4.1_01/jre/classes
Õâʱ´ó¼ÒÖªµÀÁËΪʲôÎÒÃDz»ÐèÒªÔÚϵͳÊôÐÔCLASSPATHÖÐÖ¸¶¨ÕâЩÀà¿âÁË°É£¬ÒòΪJVMÔÚÆô¶¯µÄʱºò¾Í×Ô¶¯¼ÓÔØËüÃÇÁË¡£
extension classloader
£À©Õ¹Àà¼ÓÔØÆ÷£¬Ëü¸ºÔð¼ÓÔØJREµÄÀ©Õ¹Ä¿Â¼£¨JAVA_HOME/jre/lib/ext»òÕßÓÉjava.ext.dirsϵͳÊôÐÔÖ¸¶¨µÄ£©ÖÐJARµÄ
Àà°ü¡£ÕâΪÒýÈë³ýJavaºËÐÄÀàÒÔÍâµÄй¦ÄÜÌṩÁËÒ»¸ö±ê×¼»úÖÆ¡£ÒòΪĬ
Ïà¹ØÎĵµ£º
½ñÌì½â´ðһЩͬѧÔÚѧ¿ª·¢¹ý³ÌÖеÄÆÕ±éÎÊÌâ,¾ÍÊÇÈçºÎѧºÃÒ»ÃÅÓïÑÔ?
ÎÒÊÇÕâÑùÀ´Àí½âµÄ,Òª×öÈκÎÊÂÎï,Ê×ÏÈÒª·ÖÎöΪʲôҪ×ö,Ö»ÓаѺËÐĵÄ,ÄÚÐĵÄÔÒòÕÒµ½²ÅÄÜ°ÑÒ»¼þÊÂÇé×öºÃ,·ñÔò,Ä㻨ÔÙ¶àµÄѧ·ÑѧijÖÖ¼¼ÊõÈÔÈ»»áÒ»ÎÞËù»ò,´ÓÎÒ¸öÈ˵ijɳ¤¹ý³ÌÀ´½«ÎÒÊÇ´Ó97Äê½Ó´¥¼ÆËã»ú,¿ªÊ¼Ñ§µÄһ̤ºýÍ¿,²»ÖªµÀÀÏʦÔÚ½²Ê²Ã´,²»ÖªµÀѧÁË»áÓÐʲ ......
ÎÄÕÂÔ´´£¬×ªÔØÇëÓëBlogÖ÷ÈËÁªÏµ£¬robin9257@hotmail.com
JAVAÓëSQLÇŽӵÄÓÅȱµã£º
1¡¢Óŵ㣺²»ÓÃÏÂÔØÇý¶¯³ÌÐò£¬ÔÊÐíÓÃÏàͬ´úÂë·ÃÎʲ»Í¬DBMS¡£
2¡¢È±µã£ºÐ§Âʵ͡£
¾³£³öÏֵı¨´íµã£º
1¡¢java.sql.SQLException: [Microsoft][ODBC Çý¶¯³ÌÐò¹ÜÀíÆ÷] δ·¢ÏÖÊý¾ÝÔ´Ãû³Æ²¢ÇÒδָ¶¨Ä¬ÈÏÇý¶¯³ÌÐò
&nbs ......
JAVA\JSPÉÏ´«×é¼þ
±¾ÈËÖ»ÓÐÕâ¸öË®×¼,»áµÄÇëÖ¸µã£¬²»»áµÄ£¬¿ÉÒÔÄÃÔ´Âë
´ó¸ÅµÄÒªÇó£º
µ¥¶À¸ºÔðÉÏ´«µÄÀà,Ö»ÓÃiframeµ÷ÓÃÆäËüµÄÀ಻Óõ÷ÓÃ
ÉÏ´«Ô¤ÀÀ
µ¥¸öÎļþÉÏ´«Óë¶à¸öÎļþ¶¼Ö§¸¶
¶à¸öÎļþÉÏ´«ÐèÒªÔÚiframe¸¸¼¶Ò³Ãæ´«²Î£¬Ò²¾ÍÊÇ¿ª¹ØÄñ
Ô¤ÀÀʱ¿ÉÒÔɾ³ýÔÎļþºÍÔ¤ÀÀµÄ(¶à¸öÎļþ)ij¸ö½Úµã
ÎļþÀàÐ͵ÄÔÚiframe¶¨Òå
½ûÖ¹ÓÃ ......
¶þ ¶ÔÏó
ÀàʵÀý»¯¿ÉÉú³É¶ÔÏ󣬶ÔÏóͨ¹ýÏûÏ¢´«µÝÀ´½øÐн»»¥¡£ÏûÏ¢´«µÝ¼´¼¤»îÖ¸¶¨µÄij¸ö¶ÔÏóµÄ·½·¨ÒԸıäÆä״̬»òÈÃËü²úÉúÒ»¶¨µÄÐÐΪ¡£Ò»¸ö¶ÔÏóµÄÉúÃüÖÜÆÚ°üÀ¨Èý¸ö½×¶Î£ºÉú³É¡¢Ê¹ÓúÍÏû³ý¡£
¶ÔÏóµÄÇå³ý
¡¡¡¡ µ±²»´æÔÚ¶ÔÒ»¸ö¶ÔÏóµÄÒýÓÃʱ£¬¸Ã¶ÔÏó³ÉΪһ¸öÎÞÓöÔÏó¡£JavaµÄÀ¬»ø ......
ÔËÐÐÓ¦ÓóÌÐòÓëÔËÐÐweb³ÌÐòÔÀíÊÇÒ»Öµģ¬Ö»²»¹ýwebÓ¦ÓóÌÐòÒѾÔÚÆô¶¯Ê±½«³ÌÐòÔËÓõÄjar°üÉèÖõ½»·¾³±äÁ¿ÀӦÓóÌÐò¿ÉÒÔ×Ô¼ºÐ´¸öÅú´¦ÀíÀ´ÉèÖû·¾³±äÁ¿£º
java -classpath ./lib/application.jar;./lib/hibernate3.jar -Xms608m -Xmx608m com.zyj.application.StartUp
pause/exit
ÆäÖÐapplication.jarΪӦÓóÌÐòµÄjar° ......