Results 1 to 1 of 1
Thread: Executing Batch
- 08-14-2007, 09:49 AM #1
Member
- Join Date
- Aug 2007
- Posts
- 1
- Rep Power
- 0
Executing Batch
Hello,
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:
I'm getting the following error when the db2cmd window opens:Java Code: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.
Regards
Similar Threads
-
Batch Files in java
By coco in forum New To JavaReplies: 3Last Post: 12-05-2008, 01:30 PM -
run a batch file as windows nt service
By radhika123 in forum New To JavaReplies: 0Last Post: 04-04-2008, 01:46 PM -
How to convert batch application to server app?
By johann_p in forum New To JavaReplies: 0Last Post: 03-28-2008, 09:39 PM -
Problem in batch file
By marwa in forum New To JavaReplies: 0Last Post: 08-14-2007, 10:24 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks