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

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

windows xpÏÂÅäÖÃJDK»·¾³±äÁ¿£º
      1.°²×°JDK£¬°²×°¹ý³ÌÖпÉÒÔ×Ô¶¨Ò尲װĿ¼µÈÐÅÏ¢£¬ÀýÈçÎÒÃÇÑ¡Ôñ°²×°Ä¿Â¼ÎªD:\java\jdk1.5.0_08£»
¡¡ 2.°²×°Íê³Éºó£¬ÓÒ»÷“ÎҵĵçÄÔ”£¬µã»÷“ÊôÐÔ”£»
      3.Ñ¡Ôñ“¸ß¼¶”Ñ¡Ï£¬µã»÷“»·¾³±äÁ¿”£»
      4.Ôړϵͳ±äÁ¿”ÖУ¬ÉèÖÃ3ÏîÊôÐÔ£¬JAVA_HOME,PATH,CLASSPATH(´óСдÎÞËùν),ÈôÒÑ´æÔÚÔòµã»÷“±à¼­”£¬²»´æÔÚÔòµã»÷“н¨”£»
      5.JAVA_HOMEÖ¸Ã÷JDK°²×°Â·¾¶£¬¾ÍÊǸղŰ²×°Ê±ËùÑ¡ÔñµÄ·¾¶D:\java\jdk1.5.0_08£¬´Ë·¾¶Ï°üÀ¨lib£¬bin£¬jreµÈÎļþ¼Ð£¨´Ë±äÁ¿×îºÃÉèÖã¬ÒòΪÒÔºóÔËÐÐtomcat£¬eclipseµÈ¶¼ÐèÒªÒÀ*´Ë±äÁ¿£©£»
     
       PathʹµÃϵͳ¿ÉÒÔÔÚÈκη¾¶ÏÂʶ±ðjavaÃüÁÉèΪ£º
%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
¡¡   CLASSPATHΪjava¼ÓÔØÀà(class or lib)·¾¶£¬Ö»ÓÐÀàÔÚclasspathÖУ¬javaÃüÁî²ÅÄÜʶ±ð£¬ÉèΪ£º
.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar (Òª¼Ó.±íʾµ±Ç°Â·¾¶)
¡¡¡¡%JAVA_HOME%¾ÍÊÇÒýÓÃÇ°ÃæÖ¸¶¨µÄJAVA_HOME£»
       6.“¿ªÊ¼”£­>;“ÔËÐД£¬¼üÈë“cmd”£»
       7.¼üÈëÃüÁî“java -version”£¬“java”£¬“javac”¼¸¸öÃüÁ³öÏÖ»­Ã棬˵Ã÷»·¾³±äÁ¿ÅäÖóɹ¦£»
       8.ºÃÁË£¬´òÍêÊÕ¹¤¡£ÏÂÃ濪ʼÄãµÄµÚÒ»¸öjava³ÌÐò°É¡£
ÏÂÃæ½²½²java¼¸¸ö»·¾³±äÁ¿µÄº¬ÒåºÍlinuxϵÄÅäÖ÷½·¨£º
ͨ³££¬ÎÒÃÇÐèÒªÉèÖÃÈý¸ö»·¾³±äÁ¿£ºJAVA_HOME¡¢PATH ºÍ CLASSPATH¡£
JAVA_HOME£º¸Ã»·¾³±äÁ¿µÄÖµ¾ÍÊÇ Java ËùÔÚµÄĿ¼£¬Ò»Ð© Java °æµÄÈí¼þºÍһЩ Java µÄ¹¤¾ßÐèÒªÓõ½¸Ã±äÁ¿£¬ÉèÖà PATH ºÍ CLASSPATH µÄʱºò£¬Ò²¿ÉÒÔʹÓøñäÁ¿ÒÔ·½±ãÉèÖá£
PATH£ºÖ¸¶¨Ò»¸ö·¾¶ÁÐ±í£¬ÓÃÓÚËÑË÷¿ÉÖ´ÐÐÎļþµÄ¡£Ö´ÐÐÒ»¸ö¿ÉÖ´ÐÐÎļþʱ£¬Èç¹û¸ÃÎļþ²»ÄÜÔÚµ±Ç°Â·¾¶ÏÂÕÒµ½£¬ÔòÒÀ´ÎÑ°ÕÒ PATH ÖеÄÿһ¸ö·¾¶£¬Ö±ÖÁÕÒµ½¡£»òÕßÕÒÍê PATH ÖеÄ·¾¶Ò²²»ÄÜÕÒµ½£¬Ôò±¨´í¡£Java µÄ±àÒëÃüÁî (javac)£¬Ö´ÐÐÃüÁî (java) ºÍһЩ¹¤¾ßÃüÁî (javadoc, jdb µÈ) ¶¼ÔÚÆ䰲װ·¾¶ÏÂ


Ïà¹ØÎĵµ£º

javaʵÏÖ×ÊÔ´ÏÂÔØ

/Download   by   HTTP  
//For   other   protocol,   do   it   yourself  
import   java.net.*;  
import   java.io.*;  
public   class   DonwLoa ......

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 ......

How to use Java as NT SERVICE


 service = new
 Service();  
        thread=new
 Thread(service);  
        try
  
        {  
   ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ