• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6341
  • Last Modified:

run cmd in background

Hi All,

I am doing the following:
Runtime.getRuntime().exec ( "cmd.exe /C start C:/lxf/ipssources/bin/integrate/covenant.bat" ) ;

Cmd pops up and I do not want it like that I want cmd to run in the background how do I do that.

Thanks
Menaka
0
menakaindrani
Asked:
menakaindrani
1 Solution
 
BreadstickCommented:
Try it without 'start'.
0
 
DrWarezzCommented:
You MAY be able to find something if you search at command prompt: cmd /?

However, I think your best solution would be to perform all of the commands that the batch file does, but via the Java file.

gL,
[r.D]
0
 
DrWarezzCommented:
Ah - breadsticks idea should work :)
[r.D]
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
CEHJCommented:
Did you try just

Runtime.getRuntime().exec ( "C:/lxf/ipssources/bin/integrate/covenant.bat" ) ;

?
0
 
kiranhkCommented:
or you can try cmd.exe /min
0
 
DrWarezzCommented:
>"Runtime.getRuntime().exec ( "C:/lxf/ipssources/bin/integrate/covenant.bat" ) ;"
That won't work -- because wants to start the batch file, and have it run in the background. That will just open the normal cmd window.

And the /min switch will only minimize it.

I stand by my orginial suggestion. :)

[r.D]
0
 
sciuriwareCommented:
Running on W98? Then the MSDOS popup is simply a JAVA bug.
;JOOP!
0
 
DrWarezzCommented:
For me, breadstick's method of "Try it without 'start'", appears to work :)

Give it a go! :D

[r.D]
0
 
kiranhkCommented:
hey... did u get any solution for your problem

the solution is

>>>>>>>>> or you can try cmd.exe /min

"cmd.exe /c"

this will restrict the window to popup
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now