473,388 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

capture output from cammad line argument

lkr
how to capture java output from cammand line agrument using c#
Nov 17 '05 #1
2 1476
lkr <lk*@discussions.microsoft.com> wrote:
how to capture java output from cammand line agrument using c#


Could you explain in a bit more detail? It's not obvious what you mean.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #2
lkr
hi Jon
v r doing a editor in C# for compilation of c c++ and java.Simply open the
file and execute it...
here is the code
//////////////////////////starting the execution
here//////////////////////////
private void Execute_Click(object sender, System.EventArgs e)
{
try
{
Process chk = new Process();
string str_txtbx= txtbxCmd.Text;//compilation command
string str_txtbx1= txtbxPath.Text;//Path of the file to be
executed
if(str_txtbx1=="")
chk.StartInfo.FileName=str_txtbx;
else
{
chk.StartInfo.Arguments=str_txtbx1 ;
chk.StartInfo.FileName=str_txtbx;
}
MessageBox.Show("ERR TRy->"+ str_txtbx1 );

chk.StartInfo.UseShellExecute = false;
chk.StartInfo.RedirectStandardOutput = true;
chk.Start();
chk.WaitForExit();

string output = chk.StandardOutput.ReadToEnd();
MessageBox.Show(output);//

}
catch (Exception e1)
{
MessageBox.Show("ERR ->" + e1.ToString());
}
}

//////////////end///////////////////////////////////////
But here from StandardOutput Stream we r not able to read.But process is
executing fine.
Actually after the execution the output of the program v have to display in
the form. How can this possible?
Expecting ur reply.............
lkr
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Jay Donnell | last post by:
I have a function that is a few thousand lines of code (I didn't write it) and I want to capture the output and save it as a variable. This is very easy to do in php. It would look something like...
1
by: Ernesto | last post by:
I'm looking for a way to capture command line output from a cmd session. Is there a way to use python to launch the application from the beggining.... then stream all of the output to a text...
5
by: Muffin | last post by:
I am trying to capture the out put of a command line program. Let say ping or maybe better yet nslookup. I would like to launch and then capture all the output , redirect it I guess to a string...
2
by: jdbartlett | last post by:
I'm trying to capture output from a command line utility (XMLSec), but only get an empty result. If I call the script from the command line, I see XMLSec's output, but I can't seem to capture it!...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.