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
menakaindraniAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BreadstickCommented:
Try it without 'start'.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.