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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "logging of compile time errors" Watch "logging of compile time errors" New topic

logging of compile time errors

Ankit V Agrawal

Joined: Nov 26, 2008
Posts: 15

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

Joined: Oct 13, 2005
Posts: 38041
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

Joined: Jul 08, 2003
Posts: 24183

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

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

Joined: Jun 24, 2003
Posts: 3274

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
who gives compile time error in java ?
unable to open store service tool in wcs 5.1
Not able to find root cause in a web application
Conditional display of DisplayTable of DisplayTag
How to create a Log File...... plz help me