This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logging of compile time errors

 
Ankit V Agrawal
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??
 
Campbell Ritchie
Sheriff
Pie
Posts: 49774
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ankit V Agrawal
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you need it in an XLS file? Have you tried Ant and its reporting capabilities?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic