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.

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.

Try it without 'start'.

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
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.

Ah - breadsticks idea should work :)
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.

Did you try just

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

or you can try cmd.exe /min
>"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. :)

Running on W98? Then the MSDOS popup is simply a JAVA bug.
For me, breadstick's method of "Try it without 'start'", appears to work :)

Give it a go! :D

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
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.