Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Direct Javadoc Output to a File 1

Status
Not open for further replies.

YerMom

Programmer
Oct 3, 2006
127
US
(This is part Java and part DOS, but mostly Java I think, so I'm posting it here.)

I'm on windows xp running a doclet from a .bat file and I want to direct all Javadoc output to a log file. Following is the contents of my .bat file:

Code:
@echo off
Title Javadoc
color 0E

del DocletExtractFile.xml
del log.txt

javadoc com.company.data -private -doclet CreateDocletExtractFile >> log.txt

pause

But warnings and errors are displayed in the console and not in the log.txt file.
 
There is a distinction between System.out and System.err - alias stdout and stdout.

stdout is used in your way.
stderr is used on linux with a '2':

javadoc com.company.data -private -doclet CreateDocletExtractFile 2>> err.txt

to put them both into the same file, you would use

javadoc com.company.data -private -doclet CreateDocletExtractFile 1>> log.txt 2>&1

Perhaps that's working on the xp command line too.


don't visit my homepage:
 
stefanwagner,

Thank you so much! Your idea works perfectly on windows.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top