Solved

Reading output from JDK with VB.

Posted on 1998-09-16
3
142 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
  • 2
3 Comments
 
LVL 3

Expert Comment

by:a111a111a111
Comment Utility
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
Comment Utility
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 450 total points
Comment Utility
 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now