[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Reading output from JDK with VB.

Posted on 1998-09-16
3
Medium Priority
?
159 Views
Last Modified: 2010-04-30

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
Comment
Question by:vienna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Expert Comment

by:a111a111a111
ID: 1435334
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
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1435335
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
 
LVL 13

Accepted Solution

by:
Mirkwood earned 1800 total points
ID: 1435336
 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question