Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Java Compiler from VB

Status
Not open for further replies.

jbrowne

Programmer
Feb 1, 2000
182
0
0
IE
Hi Folks,

Heres my problem.

I have a number of .java files loaded onto a grid that I want to compile into .class's using the Java compiler.

I want to loop thru the grid, line by line calling the java compiler (javac.exe) for each file.

I am running the following command to do so;

result = ShellExecute(Scr_hDC, "Open", "javac.exe", "(destination folder) (.java folder and file) ","C:\", SW_SHOWNORMAL)

I am having some success with this but need to be able to capture the output from the java compiler into a text file. I tried to add ">C:\result.txt" (as was suggested to me in an earlier thread) to the end of the parameters but to no success.

Can anyone help me out here

Thanks
John B
 
Hi,

This can be done as I've seen a piece of software do it already - HotHML 3 - when our company wanted to list their product on our catalog, I'll talk to the developer about how he achieved his "buildmanager" tool if you like:)

Basically its doing what you want, you configure a compiler, and it runs the commands and captures the DOS output... i'm guessing thats what you want... then you can save that to whereever you want:)

- Emily
 
One of the guys vb5programer, Strongm, johnwm or someone else has shown how to grab the output from pipes..... hmm found one by CajunCenturion thread705-667547

Just do a search on "SHELL PIPE" and you should get some interesting reading.

Hope I've been helpful,
Wayne Francis

If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top