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

JavaÈ¡µÃ´úÂëËùÔÚÐкŵķ½·¨

ÓÃCµÄÈËÒ»¶¨ÖªµÀ__FILE__ºÍ__LINE__,µ«ÊÇJavaÖÐ ²¢Ã»ÓÐÕâÑùµÄ¶¨Ò壬ÓÐʱºòµ÷ÊÔ¶àÏ߳̾ͺܲ»·½±ã£¬Ã»°ì·¨£¬×Ô¼º¶¯ÊÖ£¬·áÒÂ×ãʳ~ÓÃÏÂÃæµÄº¯ÊýÈ¡µÃµ±Ç°Ðкš£
º¯Êý£º
/**
*µÃµ½ExceptionËùÔÚ´úÂëµÄÐÐÊý
*Èç¹ûûÓÐÐÐÐÅÏ¢,·µ»Ø-1
*/
public static int getLineNumber(Exception e){
StackTraceElement[] trace =e.getStackTrace();
if(trace==null||trace.length==0) return -1; //
return trace[0].getLineNumber();
}
ʹÓÃÀý×Ó£º
System.out.println(“Current line:”+getLineNumber(new Exception()));


Ïà¹ØÎĵµ£º

jsp(JAVA)α¾²Ì¬µÄ¾ßÌåÉèÖùý³Ì

Ò»£ºµ½http://tuckey.org/urlrewrite/  ÏÂÔØurlrewrite¼Ü°ü£¨ÍƼö2.6.0£©
¡¡¡¡¶þ£º½âѹËùÏÂÔØµÄÎļþ,°Ñurlrewrite-2.6.0.jar¸´ÖƵ½ÏîÄ¿µÄWebRoot/WEB-INF/lib/Ŀ¼ÏÂ
¡¡¡¡Èý£º°Ñurlrewrite.xml¸´ÖƵ½ÏîÄ¿µÄWebRoot/WEB-INF/Ŀ¼ÏÂ
¡¡¡¡ËÄ£ºÔÚweb.xmlÎļþÖмÓÈëÒÔÏÂ
¡¡¡¡<filter>
¡¡¡¡<filter-name>Ur ......

Ïê½âJava»Øµ÷»úÖÆ (Callback) ½²½â+ʵÀý

JavaÖеĻص÷£¨callback£©ÊǺÜÖØÒªµÄÒ»¸ö¸ÅÄspringÕûºÏhibernate´óÁ¿Ê¹ÓÃÁËÕâÖÖ¼¼Êõ¡£
¾¿¾¹ÔõÑù²ÅÊǻص÷ÄØ£¿
ÕâÊÇÍøÉÏ×î¶à¼ûµ½µÄ˵Ã÷£º   
  1.class   A,class   B   
  2.class   AʵÏÖ½Ó¿Úcallback
  3.class   BÓµÓÐÒ»¸ ......

ËÄ¡¢¶ÔjavaÈëÃŵļ¸µã½¨Òé

   Ã²ËÆ±È½Ï¶à£¬²»¹ý¶à¶®µã£¬Ò²Ã»Ê²Ã´²»ºÃ¡£
 1¡¢ÊìϤjdbc£¬»áÓÃjdbc¡£
 2  »áдsqlºÍ´æ´¢¹ý³Ì¡£
 3¡¢ÊìϤswing¿Ø¼þ¡¢²»¹ý²»½¨ÒéÓÃswing¿ª·¢¿Í»§¶Ë
 4  ÊìϤ swt£¬rcp ¿Í»§¶Ë£¬½¨ÒéÓÃrcp¿ª·¢¿Í»§¶Ë
 5  ÊìϤjsp servlet
 6  ÊìϤtomcat£¬ÖÁÉÙÖªµÀweb¡£x ......

java Óʼþ·þÎñÆ÷Ö®james°²×°ÅäÖÃ


James Óʼþ·þÎñÆ÷µÄ°²×°ºÍÅäÖÃ
»·¾³:
Óʼþ·þÎñÆ÷:
²Ù×÷ϵͳ:REDHAT LINUX AS 4
IP:192.168.1.108
×ÓÍøÑÚÂë:255.255.0
Íø¹Ø:192.168.1.1
DNS:192.168.1.2
¿Í»§¶Ë:
²Ù×÷ϵͳ:windows 2003
IP :192.168.1.2
×ÓÍøÑÚÂë:255.255.255.0
Íø¹Ø:192.168.1.1
DNS:192.168.1.2
¼òµ¥½éÉÜÒ»ÏÂÓʼþ·þÎñÆ÷µÄÅäÖû·¾³
ÒѾ­° ......

JavaÏß³ÌÖ®yeild()Àí½â

²âÊÔÖз¢ÏÖÈç¹û¼¸¸ö´¦ÓÚ¿ÉÔËÐÐ״̬µÄÏ̵߳ÄÓÅÏȼ¶¶¼Ð¡ÓÚ»òÕßµÈÓÚ6ʱ£¬yield()·½·¨¿É½«ÔËÐлú»áÈøøÓÅÏȼ¶Îª6ºÍÓÅÏȼ¶Îª5µÄÏ̡߳£
¶øÈç¹ûµ÷ÓÃÁËyield()·½·¨µÄÏ̵߳ÄÓÅÏȼ¶´óÓÚ»òµÈÓÚ7ʱ£¬Ôò²»»á½«ÔËÐлú»áÈøøÆäËûÏ̡߳£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ