Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java keytool °²È«Ö¤Êéѧϰ

keytoolÉú³ÉÖ¤Êé
ÑéÖ¤ÊÇ·ñÒÑ´´½¨¹ýͬÃûµÄÖ¤Êé
keytool -list -v -alias tomcat -keystore "%JAVA_HOME%/JRE/LIB/SECURITY/CACERTS" -storepass changeit
ɾ³ýÒÑ´´½¨µÄÖ¤Êé
keytool -delete -alias tomcat -keystore "%JAVA_HOME%/JRE/LIB/SECURITY/CACERTS" -storepass changeit
´´½¨Ö¤Êé
1.·þÎñÆ÷ÖÐÉú³ÉÖ¤Ê飺(×¢£ºÉú³ÉÖ¤Êéʱ£¬CNÒªºÍ·þÎñÆ÷µÄÓòÃûÏàͬ£¬Èç¹ûÔÚ±¾µØ²âÊÔ£¬ÔòʹÓÃlocalhost)
keytool -genkey -alias tomcat -keyalg RSA -keystore d:\mykeystore
-dname "CN=localhost, OU=localhost, O=localhost, L=SH, ST=SH, C=CN"
-keypass changeit -
storepass changeit
2.µ¼³öÖ¤Ê飬ÓÉ¿Í»§¶Ë°²×°£º
keytool -export -alias tomcat -keystore d:\mykeystore -file d:\mycerts.cer -storepass changeit
3.¿Í»§¶ËÅäÖãºÎª¿Í»§¶ËµÄJVMµ¼ÈëÃÜÔ¿(½«·þÎñÆ÷Ï·¢µÄÖ¤Êéµ¼Èëµ½JVMÖÐ)
keytool -import -trustcacerts -alias tomcat -keystore
"%JAVA_HOME%/JRE/LIB/SECURITY/CACERTS" -file d:\mycerts.cer -storepass
changeit
³£³öÏÖµÄÒì³££º“δÕÒµ½¿ÉÐÅÈεÄÖ¤Êé”--Ö÷ÒªÔ­ÒòΪÔÚ¿Í»§¶Ë佫·þÎñÆ÷Ï·¢µÄÖ¤Êéµ¼Èëµ½JVMÖУ¬¿ÉÒÔÓÃ
keytool -list -alias tomcat -keystore "%JAVA_HOME%/JRE/LIB/SECURITY/CACERTS" -storepass changeit
À´²é¿´Ö¤ÊéÊÇ·ñÕæµÄµ¼Èëµ½JVMÖС£
KeytoolÊÇÒ»¸öJavaÊý¾ÝÖ¤ÊéµÄ¹ÜÀí¹¤¾ß¡£
keystore
Keytool½«ÃÜÔ¿£¨key£©ºÍÖ¤Ê飨certificates£©´æÔÚÒ»¸ö³ÆΪkeystoreµÄÎļþÖÐ
ÔÚkeystoreÀ°üº¬Á½ÖÖÊý¾Ý£º
ÃÜԿʵÌ壨Key entity£©——ÃÜÔ¿£¨secret key£©ÓÖ»òÕßÊÇ˽ԿºÍÅä¶Ô¹«Ô¿£¨²ÉÓ÷ǶԳƼÓÃÜ£©
¿ÉÐÅÈεÄÖ¤ÊéʵÌ壨trusted certificate entries£©——Ö»°üº¬¹«Ô¿
Alias£¨±ðÃû£©

ÿ¸ökeystore¶¼¹ØÁªÕâÒ»¸ö¶ÀÒ»ÎÞ¶þµÄalias£¬Õâ¸öaliasͨ³£²»Çø·Ö´óСд
keystoreµÄ´æ´¢Î»ÖÃ

ÔÚûÓÐÖƶ¨Éú³ÉλÖõÄÇé¿öÏ£¬keystore»á´æÔÚÓëÓû§µÄϵͳĬÈÏĿ¼£¬
È磺¶ÔÓÚwindow xpϵͳ£¬»áÉú³ÉÔÚϵͳµÄC:\Documents and Settings\UserName\
ÎļþÃûΪ“.keystore”
keystoreµÄÉú³É
ÒýÓÃ
keytool -genkey -alias tomcat -keyalg RSA
  
-keystore d:\mykeystore -dname "CN=localhost, OU=localhost,
O=localhost, L=SH, ST=SH, C=CN" -keypass changeit -storepass -validity
180


Ïà¹ØÎĵµ£º

java»ù´¡×ܽá

¼Ì³Ð(inheritance)
    ¼Ì³ÐÊÇʹÓÃÒÑ´æÔÚµÄÀàµÄ¶¨Òå×÷Ϊ»ù´¡½¨Á¢ÐÂÀàµÄ¼¼Êõ£¬ÐÂÀàµÄ¶¨Òå¿ÉÒÔÔö¼ÓеÄÊý¾Ý»òÐµĹ¦ÄÜ£¬Ò²¿ÉÒÔÓø¸ÀàµÄ¹¦ÄÜ£¬µ«²»ÄÜÑ¡ÔñÐԵؼ̳и¸Àà¡£ÕâÖÖ¼¼ÊõʹµÃ¸´ÓÃÒÔÇ°µÄ´úÂë·Ç³£ÈÝÒ×£¬Äܹ»´ó´óËõ¶Ì¿ª·¢ÖÜÆÚ£¬½µµÍ¿ª·¢·ÑÓᣱÈÈç¿ÉÒÔÏȶ¨ÒåÒ»¸öÀà½Ð³µ£¬³µÓÐÒÔÏÂÊôÐÔ£º³µÌå´óС£¬ÑÕÉ ......

javaϵͳÊôÐÔ

ϵͳÊôÐÔÊÇÖ¸ÓëÓû§³ÌÐòÏà¹ØµÄ²Ù×÷ϵͳÅäÖÃÐÅÏ¢ÒÔ¼°Èí¼þÐÅÏ¢¡£Í¨³£ÓëÓû§³ÌÐòÏà¹ØµÄÊôÐԹؼü×Ö°üÀ¨£º
¡¡¡¡¡ñfile.separator:Îļþ·Ö¸ô·û£¬Windows»·¾³ÏÂΪ“"£¬Unix»·¾³ÏÂΪ“/”£»
¡¡¡¡¡ñuser.home£ºÓû§Ö÷Ŀ¼£»
¡¡¡¡¡ñjava.home£ºJavaʵʱÔËÐл·¾³µÄ°²×°Ä¿Â¼£»
¡¡¡¡¡ñjava.ext.dirs£ºJDKµÄ°²×°Ä¿ ......

javaÐòÁл¯Óë·´ÐòÁл¯

±¾ÈËÔÚ½Ó´¥¹ý³ÌÖÐÓÐÁ½¸öÌû×ÓдµÄ²»´í£¬ÔÚ´ËÕûÀíһϣº
1.ÐòÁл¯
:½«¶ÔÏóת»¯³ÉÁ÷µÄ¹ý³Ì³ÆΪÐòÁл¯ 
   ·´ÐòÁл¯
:½«Á÷ת»¯³É¶ÔÏóµÄ¹ý³Ì³Æ֮Ϊ·´ÐòÁл¯
2.¶ÔÏóÐòÁл¯(Serializable)ÊÇÖ¸½«¶ÔÏóת»»Îª×Ö½ÚÐòÁеĹý³Ì£¬¶ø·´ÐòÁл¯ÔòÊǸù¾Ý×Ö½ÚÐòÁлָ´¶ÔÏóµÄ¹ý³Ì¡£
ÉÏÃæÕâÁ½¸ö½âÊͶ¼Í¨Ë×Ò׶®¡£
ÐòÁл¯¾­ ......

ÎÒÓÃÕâ¸ö¿´Ð§¹û£ºÒ»¸ö»ù±¾µÎJava´°¿Ú´ø°´¼ü¼ì²â

Ò»¸öJava´°¿Ú´ø°´¼ü¼ì²â£¨ÅÜJava¿ÉÊÓС³ÌÐòʱÓã©£¬沒¼ÓÐÞÊΣ¬°³×Ô¼ºÓõΡ£
package math;
import java.awt.Color;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
/**
* »ù±¾µÄ»æͼ´°¿Ú£¬»Ø³µ¹Ø±Õ´°¿Ú
*/
@SuppressWarnings("s ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ