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

java ÂÒÂëÎÊÌâ


1¡¢ÖÐÎÄÎÊÌâµÄÀ´Ô´

ÓÉÓÚJava
Óï
ÑÔÄÚ²¿²ÉÓÃUNICODE±àÂ룬ËùÒÔÔÚJAVA
³ÌÐòÔËÐÐʱ£¬¾Í´æÔÚ×ÅÒ»¸ö´ÓUNICODE±àÂëºÍ¶ÔÓ¦µÄ²Ù×÷ϵͳ¼°ä¯ÀÀÆ÷Ö§³ÖµÄ±àÂë¸ñʽ
ת
»»ÊäÈë¡¢Êä³öµÄÎÊÌ⣬Õâ¸öת»»¹ý³ÌÓÐ×ÅһϵÁеIJ½Ö裬Èç¹ûÆäÖÐÈκÎÒ»²½³ö´í£¬ÔòÏÔʾ³öÀ´µÄºº×־ͻá³öÊÇÂÒÂ룬Õâ¾ÍÊÇÎÒÃdz£¼ûµÄJAVA
ÖÐ
ÎÄÎÊÌâ¡£¼¸ºõËùÓеÄä¯ÀÀÆ÷ĬÈÏÔÚ´«µÝ²ÎÊýʱ¶¼ÊÇÒÔUTF-8±àÂë¸ñʽ
À´´«µÝ£¬¶ø²»ÊÇ°´ÖÐÎıàÂë´«µÝ£¬ËùÒÔ£¬´«µÝ
ÖÐÎIJÎÊýʱҲ»áÓÐÎÊÌ⣬´Ó¶ø´øÀ´ÂÒÂëÏÖÏó¡£×ÜÖ®£¬ÒÔÉϼ¸¸ö·½ÃæÊÇJAVA
ÖеÄÖÐÎÄÎÊÌâµÄÖ÷ÒªÀ´Ô´£¬ÎÒÃÇ°ÑÒÔÉÏÔ­ÒòÔì
³ÉµÄ³ÌÐò²»ÄÜÕýÈ·ÔËÐжø²úÉúµÄÎÊÌâ³Æ×÷£ºJAVA
ÖÐÎÄÎÊÌâ¡£
2¡¢JAVA
±à
Âëת»»µÄÏêϸ¹ý³Ì
ÎÒÃdz£¼ûµÄJAVA
³ÌÐò°üÀ¨ÒÔÏÂÀà±ð£º
      
*Ö±½ÓÔÚconsoleÉÏÔËÐеÄÀà(°üÀ¨¿ÉÊÓ»¯½çÃæµÄÀà)
       *JSP´úÂëÀࣨע£ºJSPÊÇServletsÀàµÄ±äÐÍ£©
      
*ServeletsÀà
       *EJBÀà
       *ÆäËü²»¿ÉÒÔÖ±½ÓÔËÐеÄÖ§³ÖÀà
ÕâЩÀàÎļþÖУ¬¶¼ÓпÉÄܺ¬ÓÐÖÐÎÄ
×Ö·û´®£¬²¢ÇÒÎÒÃdz£ÓÃÇ°ÈýÀàJAVA
³ÌÐòºÍÓû§Ö±½Ó½»»¥£¬ÓÃÓÚÊä³öºÍÊäÈë×Ö·û£¬È磺ÎÒÃÇÔÚJSPºÍServletÖеõ½¿Í»§¶ËËÍÀ´µÄ×Ö
·û£¬ÕâЩ×Ö·ûÒ²°üÀ¨ÖÐÎÄ×Ö·û¡£ÎÞÂÛÕâЩJAVA
ÀàµÄ×÷ÓÃÈçºÎ
£¬
ÕâЩJAVA
³Ì
ÐòµÄÉúÃüÖÜÆÚ¶¼ÊÇÕâÑùµÄ£º
*±à³ÌÈËÔ±ÔÚÒ»¶¨µÄ²Ù×÷ϵͳÉÏÑ¡ÔñÒ»¸öºÏÊʵı༭Èí¼þÀ´ÊµÏÖÔ´³ÌÐò´úÂë²¢ÒÔ.java
À©
Õ¹Ãû±£´æÔÚ²Ù×÷ϵͳÖУ¬ÀýÈçÎÒÃÇÔÚÖÐÎÄwin2kÖÐÓüÇʱ¾±à¼­Ò»¸öjava
Ô´³ÌÐò£»
      
*±à³ÌÈËÔ±ÓÃJDKÖеÄjavac.exeÀ´±àÒëÕâЩԴ´úÂ룬ÐγÉ.classÀà(JSPÎļþÊÇÓÉÈÝÆ÷µ÷ÓÃJDKÀ´±àÒëµÄ)£»
      
*Ö±½ÓÔËÐÐÕâЩÀà»ò½«ÕâЩÀ಼Êðµ½WEBÈÝÆ÷ÖÐÈ¥ÔËÐУ¬²¢Êä³ö½á¹û¡£
      ÄÇô£¬ÔÚÕâЩ¹ý³ÌÖУ¬JDKºÍJVMÊÇÈçºÎ
½«
ÕâЩÎļþÈç
ºÎ
±àÂëºÍ½âÂë²¢ÔËÐеÄÄØ£¿
      ÕâÀÎÒÃÇÒÔÖÐÎÄwin2k²Ù×÷ϵͳΪÀý˵Ã÷JAVA
Àà
ÊÇÈçºÎ
À´
±àÂëºÍ±»½âÂëµÄ¡£
µÚÒ»²½£¬ÎÒÃÇÔÚÖÐÎÄwin2kÖÐÓñ༭Èí¼þÈç¼Çʱ¾±àдһ¸öJava
Ô´³ÌÐòÎļþ(°üÀ¨ÒÔÉÏÎåÀàJAVA
³Ì
Ðò)£¬³ÌÐòÎļþÔÚ±£´æʱĬÈϲÉÓÃÁ˲Ù×÷ϵͳĬÈÏÖ§³ÖGBK±àÂë¸ñʽ
(²Ù×÷ϵͳĬÈÏÖ§³ÖµÄ¸ñʽΪ
file.encoding¸ñʽ)ÐγÉÁËÒ


Ïà¹ØÎĵµ£º

java »·¾³±äÁ¿ÅäÖÃ

windows xpÏÂÅäÖÃJDK»·¾³±äÁ¿£º
      1.°²×°JDK£¬°²×°¹ý³ÌÖпÉÒÔ×Ô¶¨Ò尲װĿ¼µÈÐÅÏ¢£¬ÀýÈçÎÒÃÇÑ¡Ôñ°²×°Ä¿Â¼ÎªD:\java\jdk1.5.0_08£»
¡¡ 2.°²×°Íê³Éºó£¬ÓÒ»÷“ÎҵĵçÄÔ”£¬µã»÷“ÊôÐÔ”£»
      3.Ñ¡Ôñ“¸ß¼¶”Ñ¡Ï£¬µã»÷“ ......

java²¢·¢±à³Ìʵ¼ù±Ê¼Ç

1, ±£Ö¤Ḭ̈߳²È«µÄÈýÖÖ·½·¨ :
a, ²»Òª¿çÏ̷߳ÃÎʹ²Ïí±äÁ¿
b, ʹ¹²Ïí±äÁ¿ÊÇ finalÀàÐ͵Ä
c, ½«¹²Ïí±äÁ¿µÄ²Ù×÷¼ÓÉÏͬ²½
2, Ò»¿ªÊ¼¾Í½«ÀàÉè¼Æ³ÉḬ̈߳²È«µÄ , ±ÈÔÚºóÆÚÖØÐÂÐÞ¸´Ëü ,¸üÈÝÒ× .
3, ±àд¶àÏ̳߳ÌÐò , Ê×Ïȱ£Ö¤ËüÊÇÕýÈ·µÄ , Æä´ÎÔÙ¿¼ÂÇÐÔÄÜ .
4, ÎÞ״̬»òÖ»¶Á¶ÔÏóÓÀÔ¶ÊÇḬ̈߳²È«µÄ .
5, ²»Òª½«Ò»¸ö¹²Ïí±äÁ¿Âã ......

JSP/Java»ñÈ¡HTTP headerÐÅÏ¢(request)Àý×Ó

<%
//header.jsp
out.println("Protocol: " + request.getProtocol() + "<br>");
out.println("Scheme: " + request.getScheme() + "<br>");
out.println("Server Name: " + request.getServerName() + "<br>" );
out.println(&quo ......

Eclipse Java×¢ÊÍÄ£°åÉèÖÃÏê½â


ÉèÖÃ×¢ÊÍÄ£°åµÄÈë¿Ú£º Window->Preference->Java->Code Style->Code Template È»ºóÕ¹¿ªComments½Úµã¾ÍÊÇËùÓÐÐèÉèÖÃ×¢Ê͵ÄÔªËØÀ²¡£ÏÖ¾Íÿһ¸öÔªËØÖðÒ»½éÉÜ£º
Îļþ(Files)×¢ÊͱêÇ©£º
/**   
* @Title: ${file_name}
* @Package ${package_name}
* @Description: ${todo}(ÓÃÒ»¾ä»°ÃèÊö¸ÃÎļ ......

JAVA·½·¨µ÷ÓÃЧÂʲî±ð

¡¡¡¡×î½üÐèÒª×öһЩJAVAµ×²ã²Ù×÷£¬ÎªÁ˾¡¿ÉÄÜÌá¸ßЧÂÊ×öÁËÈçϲâÊÔ¡£
¡¡¡¡ÔÚͬһ¸öÀàÖн¨Á¢ÆÕͨµÄPUBLIC·½·¨ºÍPUBLIC STATIC ·½·¨Á½ÖÖ£¬²¢Ê¹ÓÃJUnit½øÐжà´ÎÑ­»·¡£×îÖÕÖ¤Ã÷ʹÓöÔÏóµÄ·½Ê½µ÷ÓÃЧÂʸߡ£
¡¡¡¡ÉϽá¹û¡£
Æðʼʱ¼äFri Mar 05 10:15:37 CST 2010½áÊøʱ¼äFri Mar 05 10:15:38 CST 2010ʱ¼ä¼ä¸ô891
Æðʼʱ¼äFri ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ