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!

java & cmdline

Status
Not open for further replies.

yogpatel

Programmer
Jan 30, 2010
7
0
0
IN
Hello friends,
Actually i am working in java project in which i have to dynamically interact with cmdline window i.e. pass data to cmd
& fetch from cmd dynamically. so plz give me some hint.
Thanx,
Regards
Patel
 
Do you have a concrete question or problem? Or shall we quess what you need?
Code:
import java.util.*; 
// ...
Scanner sc = new Scanner (System.in);

What is your problem? Do you have some Java-experience? Some OOP- or programming expierience?

don't visit my homepage:
 

Hello stefanwagner,
what i mean is,
I have a dos program that I wish to access through my java program...
I can run the program and read the programs output using
DataInputStream in = new DataInputStream(new BufferedInputStream
process.getInputStream()));

But when I try to write to the program using...

DataOutputStream out = new DataOutputStream(new
BufferedOutputStream(process.getOutputStream()));
out.write(command.getBytes());
out.flush();

I get no response from the program and it doesn't seem to respond to the command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top