Hi
This is slightly out of topic (to say the least) but
could someone help me on this?
How can I pass a command at the dos prompt? I tried
the following code but it only works for windows
commands. I want to send a command like "copy x.txt
x.java" or something as a string value whose
parameters will be set at runtime. I am showing the
static method of my class file. Here, the copy
statement doesn't work but notepad gets opened.
Thanx in advance
Vijay
public static void main(String args[])
{
try {
Runtime r = Runtime.getRuntime();
r.exec("copy t1.java t2.java");
r.exec("c:\\windows\\notepad.exe");
System.out.println("Hi");
}catch(IOException e) {System.out.println(e);}
}
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".