File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes javap and output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "javap and output" Watch "javap and output" New topic

javap and output

Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
I'd like to be able to direct the output of the "javap -c SomeClass" command to a location other than my DOS prompt. My reason is that I'd like to have a look at everything that is output, but I can't scroll up past a certain point in the DOS prompt Window and so I can't see everything that is output.
From Sun's article "javap - The Java Class File Disassembler" I gather that, "javap prints its output to stdout" - but what does that mean to me? Do I have any control over this "stdout"?
Thank You.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Rob Ross

Joined: Jan 07, 2002
Posts: 2205
You could always try redirecting the output. This works on my console on NT:
javap -c SomeClass > test.txt

This will redirect the contents of the output to a new file named "test.txt"

SCJP 1.4
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
That's it.
Thanks Rob.
I agree. Here's the link:
subject: javap and output
It's not a secret anymore!