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

ÈçºÎÔÚJavaÖлñÈ¡µ±Ç°´úÂëÐÐÐкÅ

ΪÁËʵÏÖ×Ô¶¨ÒåµÄlogÀ࣬Äܹ»Êä³ö¾ßÌåµÄ´úÂëÐÐÐкţ¬Í¨¹ýʹÓÃStackTraceElement¶ÔÏóʵÏÖÁË¡£
ÕâÀïÖ¸³öÐèҪעÒâµÄ¼¸¸öÎÊÌ⣺
1. ³ÌÐòÖзµ»ØµÄ´úÂëÐÐÐкţ¬ÊÇн¨StackTrackElement¶ÔÏóµÄÄÇÒ»ÐС£
2. ¿ÉÒÔͨ¹ý´«²ÎµÄ·½·¨ÊµÏÖÊä³öÌØ¶¨ÐÐÐкš£¾ßÌåʵÏÖ¼û´úÂë¡£
1/**
 2 *
 3 */
 4package leo.demo.training;
 5
 6/**
 7 * Get current java file name and current code line number
 8 * @author Leo Xie
 9 */
10public class CurrentLine {
11    /** *//** http://www.mscto.com
12     * @param args
13     */
14    public static void main(String[] args) {
15        StackTraceElement ste1 = null;
16       
17        // get current thread and its related stack trace
18        StackTraceElement[] steArray = Thread.currentThread().getStackTrace();
19        int steArrayLength = steArray.length;
20
21        String s = null;
22       
23        // output all related info of the existing stack traces
24        if(steArrayLength==0) {
Èí¼þ¿ª·¢Íø
25            System.err.println("No Stack Trace.");
26        } else {
27            for (int i=0; i<steArrayLength; i++) {
28                System.out.println("Stack Trace-" + i);
29                ste1 = steArray[i];
30              &nbs


Ïà¹ØÎĵµ£º

Java¼¯ºÏ

  JavaÊý×éÊÇÒ»¸öJava¶ÔÏó£¬Êý×éµÄ³¤¶ÈÊǹ̶¨µÄ£¬ÔÚͬһ¸öÊý×éÖÐÖ»Äܹ»´æ·ÅÏàͬÀàÐ͵ÄÊý¾Ý£¬Êý×é¿ÉÒÔ´æ·Å»ù±¾ÀàÐ͵ÄÊý¾Ý£¬Ò²¿ÉÒÔ´æ·ÅÒýÓÃÀàÐ͵ÄÊý¾Ý¡£ÔÚ´´½¨Êý×é¶ÔÏóʱ£¬±ØÐëÖ¸¶¨Êý×é¶ÔÏóµÄ³¤¶È£¬Êý×éÒ»µ©´´½¨£¬ËüµÄ³¤¶È¾Í²»ÄÜÔÙ±ä
  £¨1£©´´½¨Êý×é¶ÔÏ󣨼´newÒ»¸öÊý×éʱ£©ÒªÖ¸¶¨Êý×éµÄ³¤¶È£¬Êý×éµÄ³¤¶ÈÒ»µ©Ö¸¶¨ ......

javaÒì³£

Throwable
Throwable ÀàÊÇ Java ÓïÑÔÖÐËùÓдíÎó»òÒì³£µÄ³¬Àà¡£Ö»Óе±¶ÔÏóÊÇ´ËÀࣨ»òÆä×ÓÀàÖ®Ò»£©µÄʵÀýʱ£¬²ÅÄÜͨ¹ý Java ÐéÄâ»ú»òÕß Java throw Óï¾äÅ׳ö¡£ÀàËÆµØ£¬Ö»ÓдËÀà»òÆä×ÓÀàÖ®Ò»²Å¿ÉÒÔÊÇ catch ×Ó¾äÖеIJÎÊýÀàÐÍ¡£
Á½¸ö×ÓÀàµÄʵÀý£¬Error ºÍ Exception£¬Í¨³£ÓÃÓÚָʾ·¢ÉúÁËÒì³£Çé¿ö¡£Í¨³££¬ÕâЩʵÀýÊÇÔÚÒì³£Çé ......

JavaʹÓÃÏà¶Ô·¾¶¶ÁÈ¡Îļþ

1.java project»·¾³£¬Ê¹ÓÃjava.ioÓÃÏà¶Ô·¾¶¶ÁÈ¡ÎļþµÄÀý×Ó£º
 *Ŀ¼½á¹¹£º
  DecisionTree
           
|___src
                 |___com.decisiontree.Sampl ......

jsp ºÍ javaµÄÖ÷񻂿±ðÊÇʲô?

javascriptдjavaû¹ØÏµ,ÖÁÓÚΪʲôÃû×ÖÕâôÏà½ü,¿ÉÄÜÊÇÒòΪjavaºÜÓÐÃûÆøËùÒÔ°ÑÃû×ÖÈ¡³É²î²»¶àµÄ,Ò»ÖÖÐÂÓïÑÔ¸Õ³öÀ´µÄʱºòÒªµãÃûÆøÀ´³öÃû°É~~
javascriptËãÊÇÒ»ÖÖhtml½Å±¾ÄÜÖ±½ÓÖ´ÐеÄÓïÑÔ°É,jspÒª±àÒë²ÅÄÜÖ´ÐÐ,Äã×Ô¼ºÐ´¸öJSP²»¿ªtomcatÖ®ÀàµÄÊÇÎÞ·¨Ö´ÐеÄ.JSPºÍJAVAµÄÇø±ð,JSPËãÊÇJAVAÒ»ÖÖ¼¼Êõ°É,ÓÃÔÚÍøÒ³±à³ÌÉÏ,ÒòΪJAVA² ......

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

ǰ¼¸Ì죬ºþÄÏSEOÔÚÓÃjspдһ¸öÆóÒµÕ¾³ÌÐòµÄʱºò£¬ÒòΪҪ²Î¼ÓÏîÄ¿´ð±ç¾ºÑ¡£¬ËùÒÔ¾ÍÏëΪ×Ô¼ºÐ´µÄ³ÌÐò¸ã¼¸¸öÁÁµã£¬ÒòΪ¸ãSEO¾ÃÁË£¬²»×Ô¾õ¾Í»áÏ뵽α¾²Ì¬£¬µ«ÊÇÔڰٶȲéÁËÒ»¸öÏÂÎ磬ֻ²éµ½ÁËurlrewrite¼Ü°üµÄÏÂÔØµØ·½£¬ºÍ¼ÜÉè·½ÃæµÄÎÄÕ£¬²¢Ã»ÓÐjsp(JAVA)α¾²Ì¬µÄ¾ßÌå²Ù×÷ʾ·¶£¬ÓеÄÒ²Ö»ÊÇ£¬µ¥Ò³ÃæµÄα¾²Ì¬µÄд·¨£¬ÕâÀïÎÒ¾ÍÖØÍ· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ