Java ¶¯Ì¬¼ÓÔØÀà
µÚÒ»²¿·Ö£ºJavaÐéÄâ»úÆô¶¯Ê±£¬¹ØÓÚÀà¼ÓÔØ·½ÃæµÄһЩ¶¯×÷
µ±Ê¹ÓÃjava ProgramName.classÔËÐгÌÐòʱ£¬JavaÕÒµ½JRE£¬½Ó×ÅÕÒµ½jvm.dll£¬°Ñ¸Ã¶¯Ì¬¿âÔØÈëÄڴ棬Õâ¾ÍÊÇJVM¡£È»ºó¼ÓÔØÆäËü¶¯Ì¬¿â£¬ ²¢¼¤»îJVM¡£JVM¼¤»îÖ®ºó»á½øÐÐһЩ³õʼ»¯¹¤×÷£¬Ö®ºóÉú³ÉBootstrapLoader£¬¸ÃClass LoaderÊÇÓÉC++дµÄ¡£BootstrapLoader¼ÓÔØLauncher.javaÖеÄExtClassLoader£¬²¢É趨ÆäParentΪ null£¬Òâ˼ÊÇExtClassLoaderµÄParent Class Loader¾ÍÊÇBootstrapLoader¡£È»ºóBootstrapLoaderÓÖ¼ÓÔØLauncher.javaÖÐµÄ AppClassLoade£¬²¢É趨ÆäParent Class LoaderÊÇExtClassLoader¡£²»¹ýÈç¹ûµ÷ÓÃExtClassLoaderµÄgetParent( )·½·¨£¬Ôò·µ»ØµÄÊÇnull¡£ÕâÁ½¸öClass Loader¶¼ÊÇÒÔ¾²Ì¬ÀàµÄÐÎʽ´æÔÚ£¬²¢ÇÒ¶¼ÊÇÓÃJava±àдµÄ¡£
ÕâÈý¸öClass LoaderËüÃǶ¼ÓÐ×Ô¼ºµÄÀà²éÕÒ·¾¶£º
BootstrapLoader: sun.boot.class.path
ExtClassLoader: java.ext.dirs
AppClassLoader: java.class.path
ÒÔÉÏÈý¸ö·¾¶¶¼ÊÇJavaµÄϵͳÊôÐÔ£¬¿ÉÒÔͨ¹ýSystem.getProperty(String key)·½·¨À´²é¿´ÆäÉèÖãº
System.out.println(System.getProperty("sun.boot.class.path"));
Êä³ö£º
C:\Program Files\Java\jre1.5.0_04\lib\rt.jar;
C:\Program Files\Java\jre1.5.0_04\lib\i18n.jar;
C:\Program Files\Java\jre1.5.0_04\lib\sunrsasign.jar;
C:\Program Files\Java\jre1.5.0_04\lib\jsse.jar;
C:\Program Files\Java\jre1.5.0_04\lib\jce.jar;
C:\Program Files\Java\jre1.5.0_04\lib\charsets.jar;
C:\Program Files\Java\jre1.5.0_04\classes
¼´BootstrapLoader ¼ÓÔصÄÊÇjreºÍjre\libĿ¼ÏµÄclass
System.out.println(System.getProperty("java.class.path"));
Êä³ö£º
C:\Program Files\Java\jre1.5.0_04\lib\ext
¼´ExtClassLoader¼ÓÔصÄÊÇjre\lib\extϵÄclass
System.out.println(System.getProperty("java.class.path"));
Êä³ö£ºÓ¦ÓÃÀïµÄ·¾¶
Óɴ˿ɼû£¬BootstrapLoader¸ºÔðJavaºËÐÄÀࣨËùÓÐÒÔjava.*¿ªÍ·µÄÀࣩ¡£ExtClassLoader¸ºÔð¼ÓÔØÀ©Õ¹ÀࣨËùÒÔÒÔjavax.*¿ªÍ·µÄÀàÒÔ¼°´æÔÚextĿ¼ÏµÄÀࣩ¡£AppClassLoader¸ºÔð¼ÓÔØÓ¦ÓóÌÐò×ÔÉíµÄÀà¡£
µÚ¶þ²¿·Ö£ºJavaµÄÀà¼ÓÔØ»úÖÆ¡£JavaÊÇÈçºÎ¼ÓÔØÀàµÄ£¬ÆäÁ÷³Ì¡£
Àà¼ÓÔØ°´ÕÕ¼ÓÔØʱ»ú£¬ÊÇ·ñ×Ô¶¯¼ÓÔØ·ÖΪÁ½ÖÖ£ºÔ¤ÏȼÓÔغͰ´Ðè¼ÓÔØ¡£
Ô¤ÏȼÓÔصÄÀàÊÇÔÚJVMÆô¶¯Ö®ºó£¬Ó¦ÓóÌÐòÔËÐÐ֮ǰ¡£ÖÁÉÙ°üº¬rt.jarÖеÄËùÓÐÀà¡£
°´Ðè¼ÓÔØÔòÊÇÔÚÓ¦ÓóÌÐòÔËÐÐÖ®ºó£¬ÔÚ
Ïà¹ØÎĵµ£º
ǰЩÌìºÍÒ»¸öC++³ÌÐòÔ±ÁÄÌìʱ£¬Áĵ½Ò»Ð©¶ÔÏó¡¢Êý×é´æ´¢¿Õ¼äʱ£¬ÓÉÓÚÁ½È˶¼²»ÊÇ´óÄñ£¬Ö®Ç°Ò²¿´¹ýһЩjava´æ´¢Êý¾ÝµÄ×ÊÁÏ£¬µ«¶¼ÊǹýÄ¿±ãÍü¡£Ò²Ã»ÓнøÐÐ×ܽá¹ý¡£ÏÂÃæÊÇתÔعýÀ´£¬¸Ð¾õ×ܽáµÄºÜÈ«Ãæ¡£
java¶ÔÏóÄÚ´æ»úÖÆ£ºhttp://java.chinait ......
(Ò»)¹ýÂËÆ÷Àà±àд¡£
1¡¢ÉèÖÃ×Ö·û¼¯±àÂ뷽ʽ£º
±àд¹ýÂËÆ÷ÀࣺʵÏÖ½Ó¿Újavax.servlet.Filter
public class CharacterEncodingFilter implements Filter {
private String charset;
public void destroy() {
// TODO Auto-generated method stub
}
public void ......
Ò»¡¢Ê²Ã´ÊÇJSON
¡¡¡¡JSON ¼´ JavaScript Object Natation(Java¶ÔÏó±íʾ·¨)£¬ËüÊÇÒ»ÖÖÇáÁ¿¼¶µÄÊý¾Ý½»»»¸ñʽ£¬·Ç³£ÊʺÏÓÚ·þÎñÆ÷Óë JavaScript µÄ½»»¥¡£
¡¡¡¡¼ò¶øÑÔÖ®£¬JSON¾ÍÊÇJavaScript½»»»Êý¾ÝµÄÒ»ÖÖ¸ñʽ¡£Àý×ÓÈçÏ£º
{"username":"coolcooldool","password":"1230","usertype":"superadmin"}
{"list":[{"password": ......
¸ÅÒª£ºJava¼¯ºÏAPIÔ¶²»Ö¹ÊÇÊý×éµÄÌæ´úÆ·£¬¾¡¹ÜÄÇÊÇÒ»¸ö²»»µµÄÈÏÖªÆðµã¡£Ted NewardչʾÁË5¸öÄܸü´óÀûÓü¯ºÏ¿ò¼ÜµÄÇÏÃÅ£¬°üº¬Ò»¸ö¶¨ÖƲ¢À©Õ¹Java¼¯ºÏAPIµÄÈëÃż¶Ó¦Óá£
¶ÔÓÚÐí¶àJava¿ª·¢Õ߶øÑÔ£¬Java¼¯ºÏAPIÊDZê×¼µÄJavaÊý×é¼°ÆäÈ«²¿È±µãµÄ±ØÒªÌæ´úÆ·¡£½«¼¯ºÏ¿ò¼ÜÖ÷ÒªÓëArrayListÁªÏµÆðÀ´²¢²»ÊÇÒ ......