Jump to content
xisto Community
Sign in to follow this  
krunalpatel1410

Capture Command Prompt Data Into Text File

Recommended Posts

hi, i m running several command in telnet/ssh command prompt it is a linux base server. now i want to add some clear screen and capture the command prompt data into text file. whole session can write into file. and this to facility can be given into menu bar specified menu click event. i want to add this functionality into my own applet jar file. so . if u have any code for this or any idea then plz help me i m in vary trouble...

Share this post


Link to post
Share on other sites

Java has a way to read lines from standard output. You need to import BufferedReader from java.io in order to read the lines of a standard output. I don't know Java enough to write you an example, but you can look up examples on how to implement BufferedReader to fit your needs, over the internet.

Share this post


Link to post
Share on other sites

Java has a way to read lines from standard output. You need to import BufferedReader from java.io in order to read the lines of a standard output. I don't know Java enough to write you an example, but you can look up examples on how to implement BufferedReader to fit your needs, over the internet.

hi, thanks for hint...
have u implement the code for getting command prompt data into text file. if u done ..then please give me code for reference...
pl as soon as possible

Share this post


Link to post
Share on other sites

I've only gotten into the basics of Java, and not necessarily to actually make Java programs. Java and C++ are quite similar with a few variations here and there. Because of which, i am merely in this for the sake of C++, to help me better understand C++, since it is quicker to learn a program with simpler ways of doing things than it is to just dive into a complex programming language. So, unfortunately, i cannot provide you with any example code for Java.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.