• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 162
  • Last Modified:

Reading output from JDK with VB.


Please read this q. carefully.

I am NOT looking how to shell the JDK compiler (javac),
but to do a more complicated task, reading the
information the JDK displays after an attempt to
compile. (Errors and where or not)

I have tried shelling like this
javac >hello.txt name.java & 
javac name.java > hello.txt
and none of these methods seem to work.
Even shelling a *.bat file with the same instructions
doesn't work.

Use the DOS Console and try them out,
the hello.txt file remains empty.

So, for 450 Points,
I would like to know how to read this output.
I do not care how you do it, but as long as it somehow
writes the output to a file on the Hard Drive or
a string, or TextBox. Somewhere.




0
vienna
Asked:
vienna
  • 2
1 Solution
 
a111a111a111Commented:
You can capture the DOS screen.

Do so by Alt-Enter and then Click Mark (Copy) then Highlight.
now you can paste it to any text editor.

I think it will give you some direction.
0
 
MirkwoodCommented:
You can reject the stupid answer of A111a111a111.

Here is the real solution. I can't answer it now since the question is locked by a111a111a111

 javac writes errors to stderr, so on NT use:
    javac myfile.java 2> errors.dat

 On Win95, this doesn't work (as command.com is very poor software), so you  have to use the javac error redirection mechanism:
   javac -J-Djavac.pipe.output=true myfile.java > errors.txt

0
 
MirkwoodCommented:
 javac writes errors to stderr, so on NT use:
    javac myfile.java 2> errors.dat

 On Win95, this doesn't work (as command.com is very poor software), so you  have to use the javac error redirection mechanism:
   javac -J-Djavac.pipe.output=true myfile.java > errors.txt
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now