Java¸ß¼¶££JavaÏß³ÌÔËÐÐÕ»ÐÅÏ¢µÄ»ñÈ¡
Java¸ß¼¶££JavaÏß³ÌÔËÐÐÕ»ÐÅÏ¢µÄ»ñÈ¡
·¢²¼Ê±¼ä£º2007.11.14 05:10 À´Ô´£ºÈüµÏÍø¼¼ÊõÉçÇø ×÷Õߣºbaocl
Ò»¡¢ÎÊÌâµÄÒýÈë
ÎÒÃÇÔÚJava³ÌÐòÖÐʹÓÃÈÕÖ¾¹¦ÄÜ£¨JDK Log»òÕßLog4J£©µÄʱºò£¬»á·¢ÏÖLogϵͳ»á×Ô¶¯°ïÎÒÃÇ´òÓ¡³ö·á¸»µÄÐÅÏ¢£¬¸ñʽһ°ãÈçÏ£º
[ÔËÐÐʱ¼ä] [µ±Ç°ÀàÃû] [·½·¨Ãû]
INFO: [Óû§ÐÅÏ¢]
¾ßÌåÀý×ÓÈçTomcatÆô¶¯ÐÅÏ¢£º
Jul 9, 2004 11:22:41 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
¿´ÆðÀ´ÕâºÁÎÞÉñÆæÖ®´¦£¬²»¾ÍÊÇ´òÓ¡ÁËÒ»ÌõÐÅÏ¢Â𣿵«Èç¹ûºÃÆæÐÄÖØÒ»µã£¬×·Ñ°ºóÃæµÄʵÏÖÔÀí£¬»á·¢ÏÖÕâȷʵºÜÉñÆæ¡£
ÉÏÃæµÄLogÐÅÏ¢µÄ[µ±Ç°ÀàÃû] [·½·¨Ãû]²¿·Ö ²»ÊÇÓû§×Ô¼ºÌí¼ÓµÄ£¬¶øÊÇLogϵͳ×Ô¶¯Ìí¼ÓµÄ¡£ÕâÒâζ×ÅLogϵͳÄܹ»×Ô¶¯Åжϵ±Ç°Ö´ÐÐÓï¾äÊÇÄĸöÀàµÄÄĸö·½·¨¡£ÕâÊÇÈçºÎ×öµ½µÄ£¿
ÎÒÃÇ·±éjava.lang.reflection package£¬»ÃÏë×ÅÕÒµ½Ò»¸öStatementÓï¾ä¼¶±ðµÄReflectionÀ࣬ͨ¹ýÕâ¸öStatement¶ÔÏó»ñµÃMethod£¬È»ºóͨ¹ýÕâ¸öMethod»ñµÃdeclared Class¡£Õâ²»¾Í»ñµÃ¶ÔÓ¦µÄClassºÍMethodÐÅÏ¢ÁËÂð£¿ÕâÊÇÒ»¸ö²»´íµÄ¹¹Ï룬µ«Ò²Ö»ÄÜÊÇÒ»¸ö¹¹Ï룻ÒòΪûÓÐÕâ¸öStatement¶ÔÏó¡£
ÔÙÏëһϡ£¶ÔÁË£¬Java²»ÊÇÓÐÒ»¸öThreadÀàÂð£¿Thread.currentThread()·½·¨»ñÈ¡µ±Ç°Ị̈߳¬ÎÒÃÇÄܲ»ÄÜͨ¹ýÕâ¸öµ±Ç°Ï̻߳ñÈ¡µ±Ç°ÔËÐеÄMethodºÍClassÄØ£¿ºÜÒź¶£¬Èç¹ûÄ㻹ÔÚÓÃJDK1.4»òÒÔÏ°汾£¬ÄÇôÕÒ²»µ½ÕâÑùµÄ·½·¨¡££¨JDK1.5µÄÇé¿öºóÃæ»á½²£©
ÔÙÏëһϡ£¶ÔÁË£¬ÎÒÃǶ¼ÓкÜÉî¿ÌµÄÓ¡Ï󣬵±ÏµÍ³Å׳öExceptionµÄʱºò£¬×ÜÊÇ´òÓ¡³öÒ»´®µÄÐÅÏ¢£¬¸æËßÎÒÃÇException·¢ÉúµÄλÖ㬺ÍÒ»²ãÒ»²ãµÄµ÷ÓùØϵ¡£ÎÒÃÇÒ²¿ÉÒÔ×Ô¼ºµ÷ÓÃExceptionµÄprintStackTrace()·½·¨À´´òÓ¡ÕâЩÐÅÏ¢¡£Õâ²»¾ÍÊǵ±Ç°Ïß³ÌÔËÐÐÕ»µÄÐÅÏ¢Âð£¿ÕÒµ½ÁË£¬¾ÍÊÇËü¡£
ExceptionµÄprintStackTrace()·½·¨¼Ì³Ð×ÔThrowable£¬ÄÇôÎÒÃÇÀ´¿´Ò»Ï£¬JDKµÄThrowableµÄprintStackTrace()·½·¨ÊÇÈçºÎʵÏֵġ£
ÎÒÃÇÏÈÀ´¿´JDK1.3µÄÔ´´úÂ룬»á·¢ÏÖThrowable.printStackTrace()·½·¨µ÷ÓÃÁËÒ»¸önative printStackTrace0()·½·¨¡£ÎÒÃÇÕÒ²»µ½ÈκÎÏßË÷£¬¿ÉÒÔÓÃÔÚÎÒÃÇ×Ô¼ºµÄJava´úÂëÖС£
ÄÇÔõô°ì£¿Throwable.printStackTrace()µÄÊä³ö½á¹û×Ö·û´®ÀïÃæ²»ÊÇ°üº¬Á˵±Ç°Ïß³ÌÔËÐÐÕ»µÄËùÓÐÐÅÏ¢Âð£¿ÎÒÃÇ¿ÉÒÔ´ÓÕâ¸ö×Ö·û´®ÖгéÈ¡×Ô¼ºÐèÒªµÄÐÅÏ¢¡£JDK1.3µÄʱ´ú£¬Ò²Ö»ÄÜÕâô×öÁË¡£
¶þ¡¢Log4J 1.2µÄÏà¹ØʵÏÖ
Log4J 1.2ÊÇJDK1.3ʱ´úµÄ×÷Æ·¡£ÎÒÃÇÀ´¿´
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
Ôںܶàʱºò£¬ÎÒÃÇÐèÒª×Ô¶¯Éú³ÉÓÀÔ¶²»»áÖظ´µÄID£¬Òò´ËÎÒÃÇ»áÓõ½ÒÔϵĴúÂëÀ´ÊµÏÖ£º
×¢Ò⣺ÐèÒª¼ÓÈëÁ½¸öapacheµÄ°ü,´úÂëºÍ°üÇë´Óhttp://www.blogjava.net/afei0922/articles/129589.html ÏÂÔØ
package cn.com.cinda.rtx.state;
import org.apache.commons.id.Hex;
public class RandomCode {
pub ......
JavaÓïÑÔÒýÈëÁËJavaÐéÄâ»ú£¬¾ßÓпçƽ̨ÔËÐеŦÄÜ£¬Äܹ»ºÜºÃµØÊÊÓ¦¸÷ÖÖWebÓ¦Óá£Í¬Ê±£¬ÎªÁËÌá¸ßJavaÓïÑÔµÄÐÔÄܺͽ¡×³ÐÔ£¬»¹ÒýÈëÁËÈçÀ¬»ø»ØÊÕ»úÖƵÈй¦ÄÜ£¬Í¨¹ýÕâЩ¸Ä½øÈÃJava¾ßÓÐÆä¶ÀÌصŤ×÷ÔÀí¡£
1£®JavaÐéÄâ»ú
JavaÐéÄâ»ú£¨Java Virtual Machine£¬JVM£©ÊÇÈí¼þÄ£ÄâµÄ¼ÆËã»ú£¬Ëü¿ÉÒÔÔÚÈκδ¦ÀíÆ÷ÉÏ£¨ÎÞÂÛÊÇÔÚ¼ÆËã»úÖл ......
3.package com.ncs.opts.tools;
import java.util.HashMap;
import java.util.Map;
import com.ncs.opts.common.icp.dao.po.audit.IcpMainHistory;
import com.ncs.opts.common.icp.dao.po.audit.IcpModifyHistory;
import com.ncs.opts.common.icp.dao.po.audit.IcpSiteAccessHistory;
import com.ncs.opts.common.i ......