java¼ÓÃÜÓë½âÃÜ£¨¶þ£©
Êý×ÖÖ¤Ê飺
£¨Ò»£©Ö¤Êé¹ÜÀí
1.keyToolÖ¤Êé¹ÜÀí
£¨1£© ±¾µØÊý×ÖÖ¤ÊéÉú³ÉÃüÁî
keytool -genkeypair -alias www.zlex.org -keyalg RSA -keysize 2048 -sigalg SHA1withRSA -validity 36000 -keystore zlex.keystore -dname "CN=www.zlex.org,OU=zlex,O=zlex,L=SH,ST=SH,C=CN"
Êý×ÖÖ¤Êéµ¼³öÃüÁî
keytool -exportcert -alias www.zlex.org -keystore zlex.keystore -file zlex.cer -rfc
´òÓ¡Êý×ÖÖ¤ÊéÃüÁî
keytool -printcert -file zlex.cer
£¨2£©¹¹½¨CAÇ©·¢Ö¤Êé
µ¼³öÊý×ÖÖ¤ÊéÇ©·¢ÉêÇëÃüÁî
keytool -certreq -alias www.zlex.org -keystore zlex.keystore -file zlex.csr -v
µ¼ÈëÊý×ÖÖ¤ÊéÃüÁî
keytool -importcert -trustcacerts -alias www.zlex.org -file zlex.cer -keystore zlex.keystore
²é¿´µ¼ÈëÊý×ÖÖ¤ÊéÃüÁî
keytool -list -alias www.zlex.org -keystore zlex.keystore
2 OpenSSLÖ¤Êé¹ÜÀí
´Óhttp://www.slproweb.com/products/Win32OpenSSL.htmlÏÂÔØwindows°æOpenSSL
openssl rand -out private/.rand 1000
openssl genrsa -aes256 -out private/ca.key.pem 2048
openssl -req -new -key private/ca.key.pem -out private/ca.csr
openssl x509 -req -days 10000 -sha1 -extensions v3_ca -signkey private/ca.key.pem -in private/ca.csr -out
certs/ca.cer
openssl pkcs12 -export -cacerts -inkey private/ca.key.pem -in certs/ca.cer -out certs/ca.p12
keytool -list -keystore certs/ca.p12 -storetype pkcs12 -v -storepass 123456
Ïà¹ØÎĵµ£º
ÔÚjavaÏîÄ¿¼¯³Éflex¿ª·¢ÔÚweb2.0ÊÇÊÇÒ»¸öÊ®·ÖÓмÛÖµµÄ¿ª·¢·½°¸£¬ÌرðÔÚÆóÒµ¼¶µÄÓ¦ÓÃÖУ¬flexºÍjava¼äµÄͨѶԽÏÔÖØÒª¡£µ«ÊÇÏÖÔÚµÄjavaºÍflexµÄ¿ò¼ÜËäÈ»¶à£¬µ«Êǹ²Í¨ÐÔ²»´ó¡£¾ÍÊÇͨ¹ý´«Í³µÄwebserviceµ÷Óã¬Ò²ÒòΪЧÂÊÎÊÌâºÍ½âÎöxmlµÄ·±ÖصŤ×÷£¬ºÜ¶àÏîÄ¿¿ª·¢ËٶȺÍά»¤ÏÞÖƽϴó¡£ÔÚ½üÀ´ÏîÄ¿£¬ÎÒÔÚ¹«Ë¾³¢Ê ......
¾ÝÎĵµËù˵£¬ÀàÔöÇ¿Æ÷±ÈÓôúÀíµÄ·½Ê½ËÙ¶ÈÉÏÓÐÓÅÊÆ¡£
ÓÐÁ½ÖÖ·½Ê½£¬
µÚÒ»ÖÖÊÇÔÚÀà¼ÓÔØʱ¶¯Ì¬´¦Àí£¬Õâ¸ö¶ÔÏÖÓгÌÐò²»ÓÃÐ޸ġ£Ö»ÐèÒª¸ÄÏÂÔËÐеÄjava½Å±¾¼´¿É
¶ÔÓÚJava 1.5ÈçÏÂËùʾ
java -javaagent:lib/je-<version>.jar=enhance:packageNames ...
je-<version>.jar ¾ÍÊÇBerkeley DB JAVA¿âµÄÃû×Ö¡£ packageNa ......
ϵͳ×Ô¶¯Å׳öµÄÒì³£
ËùÓÐϵͳ¶¨ÒåµÄ±àÒëºÍÔËÐÐÒì³£¶¼¿ÉÒÔÓÉϵͳ×Ô¶¯Å׳ö£¬³ÆΪ±ê×¼Òì³££¬²¢ÇÒ Java Ç¿ÁÒµØÒªÇóÓ¦ÓóÌÐò½øÐÐÍêÕûµÄÒì³£´¦Àí£¬¸øÓû§ÓѺõÄÌáʾ£¬»òÕßÐÞÕýºóʹ³ÌÐò¼ÌÐøÖ´ÐС£
Óï¾äÅ׳öµÄÒì³£
Óû§³ÌÐò×Ô¶¨ÒåµÄÒì³£ºÍÓ¦ÓóÌÐòÌض¨µÄÒì³£,±ØÐë½èÖúÓÚ throws ºÍ throw Óï¾äÀ´¶¨ÒåÅ׳öÒì³£¡£
throwÊÇÓï¾äÅ׳ö ......
×ÔJava2ÒÔÀ´£¬JavaÓïÑÔÔö¼ÓÁËÒ»¸ö¹Ø¼ü×Östrictfp£¬ËäÈ»Õâ¸ö¹Ø¼ü×ÖÔÚ´ó¶àÊý³¡ºÏ±È½ÏÉÙÓ㬵«ÊÇ»¹ÊÇÓбØÒªÁ˽âһϡ£
strictfp µÄÒâ˼ÊÇFP-strict£¬Ò²¾ÍÊÇ˵¾«È·¸¡µãµÄÒâ˼¡£ÔÚJavaÐéÄâ»ú½øÐи¡µãÔËËãʱ£¬Èç¹ûûÓÐÖ¸¶¨strictfp¹Ø¼ü×Öʱ£¬JavaµÄ±àÒëÆ÷ÒÔ¼°ÔËÐл·¾³ÔÚ¶Ô¸¡µãÔËËãµÄ±í´ïʽÊDzÉÈ¡Ò»ÖÖ½üËÆÓÚÎÒÐÐÎÒËصÄÐÐΪÀ´Íê³É ......
¹ØÓÚvolatile
ÎÒÃÇÖªµÀ£¬ÔÚJavaÖÐÉèÖñäÁ¿ÖµµÄ²Ù×÷£¬³ýÁËlongºÍdoubleÀàÐ͵ıäÁ¿ÍⶼÊÇÔ×Ó²Ù×÷£¬Ò²¾ÍÊÇ˵£¬¶ÔÓÚ±äÁ¿ÖµµÄ¼òµ¥¶Áд²Ù×÷ûÓбØÒª½øÐÐͬ²½¡£
ÕâÔÚJVM 1.2֮ǰ£¬JavaµÄÄÚ´æÄ£ÐÍʵÏÖ×ÜÊÇ´ÓÖ÷´æ¶ÁÈ¡±äÁ¿£¬ÊDz»ÐèÒª½øÐÐÌرðµÄ×¢ÒâµÄ¡£¶øËæ×ÅJVMµÄ³ÉÊìºÍÓÅ»¯£¬ÏÖÔÚÔÚ¶àÏ̻߳·¾³ÏÂ
volatile¹Ø¼ü×ÖµÄʹÓñäµÃ·Ç³£ÖØ ......