HTTPs in java dev @IBM
×î½üÔÚ¿ª·¢Ò»¸öСµÄESBϵͳ£¬»áÔÚÕâÀïճһЩ¾õµÃ»áÓõĵ½µÄÎÄÕ¡£
³ö×Ô£ºwww.ibm.com.cn MattTowers 2002Äê10ÔÂ08ÈÕ
ÕªÒª
ʹÓà HTTPS£¨Hypertext Transfer Protocol Secure °²È«³¬Îı¾´«ÊäÐÒ飩²¢·ÇÄãËùÏëµÄÄÇÑù¼òµ¥Ö±½Ó¡£Èç¹ûÄãÔø¾³¢ÊÔÔÚ Java ¿Í»§¶ËºÍ HTTPS ·þÎñÆ÷Ö®¼ä½øÐа²È«µÄͨѶ£¬Ò²Ðí»á×¢Òâµ½±ê×¼µÄ java.net.URL Àಢ²»Ö§³Ö HTTPSÐÒé¡£ÕâƪÎÄÕ½«ÏòÄãչʾ£¬ÈçºÎʹÓà JDK 1.2-compatible ÐéÄâ»ú»ò΢ÈíµÄ JDK 1.1-compatible JView À´¿Ë·þÕâЩÏÞÖÆ¡£
Èç¹ûÄãÔø¾³¢ÊÔÔÚ Java ¿Í»§»úºÍ HTTPS£¨°²È«³¬Îı¾´«ÊäÐÒ飩·þÎñÆ÷Ö®¼ä½øÐа²È«µÄͨѶ£¬Ò²Ðí»á×¢Òâµ½±ê×¼µÄ java.net.URL Àಢ²»Ö§³Ö HTTPS ÐÒé¡£·þÎñ¶Ë½â¾ö´ËÎÊÌâµÄ·½·¨ÊǷdz£¼òµ¥Ã÷Á˵ġ£ÒòΪÏÖ½ñ¼¸ºõËùÓеÄWeb·þÎñÆ÷¶¼Ê¹Óà HTTPS ÐÒéÀ´Ìṩ²éѯÊý¾ÝµÄ»úÖÆ¡£Ò»µ©ÅäÖúÃÄãµÄ·þÎñÆ÷£¬ÈκÎä¯ÀÀÆ÷Ö»Òª¼òµ¥µØ½« URL µØÖ·ÖеÄÐÒéÖ¸¶¨³É HTTPS £¬¾ÍÄܹ»ÔÚÄãµÄ·þÎñÆ÷ÉÏ°²È«µØ½øÐÐÐÅÏ¢²éѯ¡£Èç¹ûÄãûÓдÆð HTTPS ·þÎñÆ÷£¬Ôò¿ÉÒÔÔÚ»¥ÁªÍøÉϼ¸ºõËùÓÐ HTTPS ÍøÒ³ÖвâÊÔÄãµÄ¿Í»§¶Ë´úÂë¡£ÔÚ×ÊÁϲ¿·Ö¸ø³öÁËÒ»¸öÁÐ±í£¬ÀïÃæÁгöÈô¸É¿É¹©Äã½øÐÐ HTTPS ͨѶ²âÊԵķþÎñÆ÷µØÖ·¡£
È»¶ø´Ó¿Í»§¶ËµÄ½Ç¶ÈÀ´¿´£¬ÔÚÊìϤµÄ HTTP ºóÃæ¼òµ¥µÄ¼ÓÉÏ“S”¾ÍÄܹ»°²È«Í¨ÐÅ¡£ÕâÖÖ¼òµ¥ÐÔ³äÂúÁËÃÔ»óÐÔ¡£ÊÂʵÉÏ£¬ä¯ÀÀÆ÷ÔÚºǫ́×öÁË´óÁ¿µÄ¹¤×÷£¬ÒÔ±£Ö¤Ã»ÓÐÈκÎÈ˴۸ĻòÇÔÌýÄãËù·¢Ë͵ÄÇëÇóÊý¾Ý¡£È»¶ø HTTPS ÐÒéÓÃÀ´¼ÓÃܵÄËã·¨ÊÇ RSA Security ËùÓµÓеÄרÀû£¨ÕâÖÖ×´¿öÖÁÉÙ»¹Òª³ÖÐø¼¸¸öÔ£©¡£¸Ã¼ÓÃÜËã·¨µÃµ½ÁËä¯ÀÀÆ÷ÖÆÔìÉ̵ÄÐí¿É£¬µ« Sum Microsystems ¹«Ë¾È´²»Í¬Ò⽫Ëü°ó¶¨µ½±ê×¼µÄ Java URL ÀàʵÏÖÖС£Õâ¾Íµ¼Öµ±Äã´´½¨ URL ¶ÔÏóʱ£¬Èô½«ÐÒéÖ¸¶¨Îª HTTPS£¬¾Í»áÅ׳öÒ»¸ö MalformedURLException Òì³£¡£
ÐÒÔ˵ÄÊÇ£¬ÎªÁ˽â¾öÕâ¸ö¾ÖÏÞ£¬Java¹æ¸ñ˵Ã÷ÊéÌṩΪ URL ÀàÑ¡ÔñÒ»¸ö´úÌæµÄÁ÷¾ä±úµÄÄÜÁ¦¡£È»¶øµ±ÄãʹÓò»Í¬µÄÐéÄâ»ú( virtual machine )ʱ£¬´Ë¼¼ÊõµÄʵÏÖ·½·¨Ò²ÊDz»Í¬µÄ¡£ÔÚ΢ÈíµÄ JDK 1.1-compatible ÐéÄâ»ú JView ÖУ¬Î¢ÈíÐí¿É¸Ã¼ÓÃÜËã·¨²¢ÌṩÁËÒ»¸ö HTTPS Á÷¾ä±ú×÷ΪËüµÄ wininet °üµÄÒ»²¿·Ö¡£¶øSUN×î½üΪËüµÄ JDK 1.2-compatible ÐéÄâ»ú·¢²¼ÁË Java Secure Sockets Extension£¨JSSE£©£¬ÔÚ JSSE ÀïÐí¿É²¢ÌṩÁË HTTPS Á÷¾ä±ú¡£±¾ÎĽ«¾ßÌå²ûÊöÈçºÎʹÓà JSSE ºÍ΢ÈíµÄ wininet °üÀ´ÊµÏÖ HTTPS Á÷¾ä±ú¡£
JDK 1.2-compatible ÐéÄâ»ú
ÔÚ JDK 1.2-compatible ÐéÄâ»úÖÐʹÓà H
Ïà¹ØÎĵµ£º
ºÜ¶àµÄÎı¾Îļþ»áÓв»Í¬µÄ±àÂë¸ñʽ£¬Ôì³ÉÕâÖÖ±àÂë²îÒìµÄ¿ÉÄÜÊÇϵͳµÄ²îÒ죬¿ÉÄÜÊÇÔÚ±£´æÎļþʱ²ÉÓÃÌض¨µÄ×Ö·û¼¯±àÂëÀ´±£´æ¡£ÕâʱÎÒÃÇÀûÓÃJavaÓïÑÔÀ´´ò¿ªÕâЩÎı¾Ê±£¬Èç¹û²»Ê¹ÓÃÕýÈ·µÄ×Ö·û¼¯½âÂëÆ÷´ò¿ª£¬¿Ï¶¨»á³öÏÖÂÒÂë¡£ºÃÔÚjava.io°üÌṩÁËÒ»¸öjava.io.InputStreamReaderÀàÀ´Ö§³ÖÖ¸¶¨Îı¾× ......
¸ÄÒ»¸öÕâÑùµÄÌâÄ¿Õýʽ¸æËßÄ㣬ÎÒÖÕÓÚ¶¯ÊּǼһЩjavaµÄ±Ê¼ÇÁË¡£ÊµÔںܾÃûÓÐдjavaÁË¡£¹þ¹þ£¬²»ºÃÒâ˼£¬ÎªÁËflash ºǫ́ÓиöÖ§³Ö£¬java Õⲿ·Ö»¹ÊÇҪѧһµã£¬µ«²»ÊǺÜÖصãѧ¡£Õⲿ·Ö¶«Î÷£¬ÎÒ²»ÊìϤ£¬Ò²ÔÚÂýÂý¼Ç¼¡£×Ô¼º¿´µÄ±Ê¼Ç£¬ËùÒÔÒªÊÇÄã²»ÊÇɵB£¬×îºÃ²»Òª¿´¡£
ÔÚ½ñÍíÁ·Ï°µÄʱºò£¬³¢ÊÔÈ¥Á¬½Ó¿É°®µÄ ......
±¾ÎĽéÉÜJavaµÄBigDecimalÀàµÄÓ¦Óá£JavaÔÚjava.math°üÖÐÌṩµÄAPIÀàBigDecimal£¬ÓÃÀ´¶Ô³¬¹ý16λÓÐЧλµÄÊý½øÐо«È·µÄÔËËã¡£
BigDecimalÀà
Ë«¾«¶È¸¡µãÐͱäÁ¿double¿ÉÒÔ´¦Àí16λÓÐЧÊý¡£ÔÚʵ¼ÊÓ¦ÓÃÖУ¬ÐèÒª¶Ô¸ü´ó»òÕ߸üСµÄÊý½øÐÐÔËËãºÍ´¦Àí¡£JavaÔÚjava.math°üÖÐÌṩµÄAPIÀàBigDecimal£¬ÓÃÀ´¶Ô³¬¹ý16λÓÐЧλµÄÊý½øÐо«È· ......
ͨ³££¬¶àÏß³ÌÖ®¼äÐèҪе÷¹¤×÷¡£ÀýÈ磬ä¯ÀÀÆ÷µÄÒ»¸öÏÔʾͼƬµÄÏß³ÌdisplayThreadÏëÒªÖ´ÐÐÏÔʾͼƬµÄÈÎÎñ£¬±ØÐëµÈ´ýÏÂÔØÏß³ÌdownloadThread½«¸ÃͼƬÏÂÔØÍê±Ï¡£Èç¹ûͼƬ»¹Ã»ÓÐÏÂÔØÍ꣬displayThread¿ÉÒÔÔÝÍ££¬µ±downloadThreadÍê³ÉÁËÈÎÎñºó£¬ÔÙ֪ͨdisplayThread“ͼƬ׼±¸Íê±Ï£¬¿ÉÒÔÏÔʾÁË”£¬Õâʱ£¬displayThread ......
×÷ÕߣºÐûÕ×Åô
------------------------------------------------------------------------------------------------------------------------------------------
¹¤×÷µÚÒ»²½£ºÊìϤMyEclipseµÄ»·¾³ÒÔ¼°Ö÷Òª¹¦ÄÜ¡£
¹¤×÷µÚ¶þ²½£º½¨Á¢Êý¾Ý¿âÁ¬½Ó
Êý¾Ý¿â£ºMySQL
1¡¢MySQLµÄÅäÖÃÓëÎÊÌâ½â¾ö
Ïê¼ûÎ ......