Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-14-2007, 11:49 AM
Member
 
Join Date: Aug 2007
Posts: 1
zcoarens is on a distinguished road
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:

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();
I'm getting the following error when the db2cmd window opens:

'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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
run a batch file as windows nt service radhika123 New To Java 0 04-04-2008 03:46 PM
How to convert batch application to server app? johann_p New To Java 0 03-28-2008 11:39 PM
Batch updates JavaForums Java Blogs 0 12-25-2007 03:21 PM
Problem in batch file marwa New To Java 0 08-14-2007 12:24 PM
Batch Files in java coco New To Java 1 08-01-2007 08:09 AM


All times are GMT +3. The time now is 10:15 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org