This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes how see jdk logs Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "how see jdk logs" Watch "how see jdk logs" New topic
Author

how see jdk logs

nafise hasani
Greenhorn

Joined: Sep 30, 2004
Posts: 12
Hi
how Can I see the logs that jdk produce during compilation of java files ?
how can I copy the in a file?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Are you using some odd compiler? None of the compilers I have log anything to a file, only to standard output.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
use standard output redirection to pipe the output into a file and there's your logfile.

How standard output redirection works depends on your operating system but usually it involves the > character possibly preceded by a stream identifier.


P.S. you can use the -verbose flag to the compiler to make sure there's always output.
As you will know the compiler will normally only give output in case of failure.
[ November 10, 2004: Message edited by: Jeroen Wenting ]

42
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24051
    
  13

This is probably the standard question of how to redirect stderr on Windows 95/98/ME; the command window doesn't have scrollback, and the error messages scroll off the screen, but command.com/exe don't let you redirect stderr.

Since JDK 1.2, the answer is to use the -Xstdout switch:

javac -Xstdout logfile BuggyProgram.java

All the output from the compiler will go into "logfile" instead of to the screen.

I'm moving this to Java in General (Beginner) for any further discussion.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://jrebel.com/download
 
subject: how see jdk logs
 
Similar Threads
JBoss performance Tuning in Linux
Protect folders outside webapps
How Can I log my pintStackTrace () statement into log file?
Startup Logs
Problems installing Tomcat/XP