473,750 Members | 2,435 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

capture output from cammad line argument

lkr
how to capture java output from cammand line agrument using c#
Nov 17 '05 #1
2 1487
lkr <lk*@discussion s.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.co m>
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(o bject sender, System.EventArg s 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.F ileName=str_txt bx;
else
{
chk.StartInfo.A rguments=str_tx tbx1 ;
chk.StartInfo.F ileName=str_txt bx;
}
MessageBox.Show ("ERR TRy->"+ str_txtbx1 );

chk.StartInfo.U seShellExecute = false;
chk.StartInfo.R edirectStandard Output = true;
chk.Start();
chk.WaitForExit ();

string output = chk.StandardOut put.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
2721
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 this. <?php function myFunc(){ echo "something else" }
1
3271
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 file ?
5
7170
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 variable or something. I know how to start it , but not how to capture it. Nslookup I realize can be started interactively, which is to some degree what I may need to do as I am discovering that there is no easy way to query DNS svr records with...
2
3098
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! My PHP installation is working correctly and captures other command line output just fine, XMLSec is the only exception I've found. I've also tried a couple of other systems to confirm this behavior. Capture methods I've tried include:
0
9000
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8838
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9396
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9339
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4887
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3322
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2804
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2225
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.