File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes logging of compile time errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "logging of compile time errors" Watch "logging of compile time errors" New topic
Author

logging of compile time errors

Ankit V Agrawal
Greenhorn

Joined: Nov 26, 2008
Posts: 15
Hi,

I want to log the compile time errors in a log file, preferably an .xls file instead of a .log file. Can any one please help me how to get arround this problem??


SCJP 5.o, SCWCD 5.o
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36486
    
  16
Find the classic Daconta article entitled "when Runtime.exec() won't" and read that. It has an example with calling the Java Compiler.
Divert the error and output streams into your files.

Try that, it might work; I haven't tried myself.

Don't know how to get the errors into .xls format, but it should be easy to get them into comma separated value (.csv) format.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

Rather than compiling by running javac directly, use Ant to create a build script; then use Ant's reporting capabilities to put the results in whatever format you need.


[Jess in Action][AskingGoodQuestions]
Ankit V Agrawal
Greenhorn

Joined: Nov 26, 2008
Posts: 15
What I want :
src\HelloWorld.java 6 ';' expected
in an xls file with
first cell : src\HelloWorld.java
second cell : 6
third cell ';' expected

Can any one please help me
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Why do you need it in an XLS file? Have you tried Ant and its reporting capabilities?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: logging of compile time errors
 
Similar Threads
Not able to find root cause in a web application
who gives compile time error in java ?
unable to open store service tool in wcs 5.1
How to create a Log File...... plz help me
Conditional display of DisplayTable of DisplayTag