Results 1 to 1 of 1
Thread: Executing Batch
- 08-14-2007, 09:49 AM #1Member
- Join Date
- Aug 2007
- Rep Power
I know, there are several forum posts about this topic. I'm sorry I'm adding another one :) . It's clear to use Process.exec to do so. I'm doing the following:
String path = "db2cmd \"C:\Documents and Settings\Administrator/.protone/advis/advis_2007_08_14_09_28_27_953.cmd\""; Process proc = Runtime.getRuntime().exec(path); proc.waitFor();
'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.
I also tried it using "db2cmd start ..." , but this failed too.
So the problem is the path with whitespaces, although I added quotation marks.
Any help is highly appreciated.
- By coco in forum New To JavaReplies: 3Last Post: 12-05-2008, 01:30 PM
- By radhika123 in forum New To JavaReplies: 0Last Post: 04-04-2008, 01:46 PM
- By johann_p in forum New To JavaReplies: 0Last Post: 03-28-2008, 09:39 PM
- By marwa in forum New To JavaReplies: 0Last Post: 08-14-2007, 10:24 AM