Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes forum!

raj NZ

+ Follow
since Nov 06, 2004
Apples and Likes
Apples
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by raj NZ

Hi,
I have downloaded a package from the apache commons website
to handle FTP. I've got it working OK, but am a bit confused on
when to set the file type. At the moment I am just using the
default which is

ftpClient.setFileType(FTP.ASCII_FILE_TYPE).

How can I tell when I need to change this for a certain type of file ?
i am running some commands on the DOS prompt via

Process p = r.exec("cmd.exe /C " + aCommand);

is there any way to hide the dos prompt window while this
is being run.

Cheers
Raj
Cheers is there any way to hide the dos prompt window
while my commands are being run
Hi,
What is the easiest way to execute dos command prompts and read back
the return. I have started out on this path.

Runtime r = Runtime.getRuntime();
Process p = r.exec("cmd");
PrintStream out = new PrintStream(p.getOutputStream());
out.println("echo Raj");
out.flush();
out.close();
InputStreamReader in = new InputStreamReade(p.getInputStream());
BufferedReader br = new BufferedReader(in);
String line;
while ((line = br.readLine()) != null) {
System.out.println(line);
}
br.close();

Cheers
Raj