How to make my hyperlinks work in console? [message #328130] |
Wed, 14 May 2008 17:26 |
Eclipse User |
|
|
|
Originally posted by: chi_tian.yahoo.com
Hi all, I'm a new user for Eclipse and don't know how to make the
hyperlinks in my print out messages work in Console window.
I'm using Eclipse 3.3 for Windows and log4j.
The hyperlinks work correcly in the stack traces when there are exceptions.
I tried to generated similar pattern message like '(MyProgram.java:232)'
in my log messages. An hyperlink (underline) does show up for that,
but I got an error message when clicking on the hyperlink.
The error message is
Searching... (Time of error: May 13, 2008 7:34:27 PM PDT)
Reason:
java.lang.NullPointerException
The way I generate the java file name and line is using something like
StackTraceElement[] trace = e.getStackTrace();
.....
StringBuffer sb = new StringBuffer(trace[i].getMethodName());
sb.append('(');
String fileName = trace[i].getFileName();
int line = trace[i].getLineNumber();
sb.append(':');
sb.append(line);
sb.append(')');
return sb.toString();
Can anyone tell me how I can make my hyperlinks work?
Should I configure some property file or attach hyperlinks to this print
message in my program?
I'd really appreciate it if anyone can give me some guidances.
Thanks in advance.
-Tian
|
|
|
Powered by
FUDForum. Page generated in 0.02631 seconds