Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8212663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:50:06+00:00 2026-06-07T10:50:06+00:00

I have the following line to run a batch file, Process process = Runtime.getRuntime().exec(cmd

  • 0

I have the following line to run a batch file,

Process process = Runtime.getRuntime().exec("cmd /c start rake.bat");

But I want it to run in the background and not display the command line to the user. How can I change it to do this?

The problem is that the command window opens and intrupts the programs GUI. I just want the command window to not be visible while it is executing the batch file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T10:50:07+00:00Added an answer on June 7, 2026 at 10:50 am

    Removing the ‘start’ completely will do what you want (as this is what is creating the window):

    Process process = Runtime.getRuntime().exec("cmd /c rake.bat");
    

    I have tested this and it works, ofcourse if you want to communicate with the command prompt you’d have to have Input and Output streams, also not forgetting your Error stream
    As stated in the comment though removing ‘start’ on XP wont help (as it wont work).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following line in my IsapiRewrite.ini file: RewriteRule ^/test-url.asp$ http://www.google.co.uk/ [R=301,L] But
I have created a batch file with the following line: forfiles /p L:\percepsrvr\SQL /s
I have a Windows batch script (my.bat) which has the following line: DTBookMonitor.exe 2>&1
I have the following line in a script I am running in the Run
I have a setup.exe project that I run with the following command-line arguments to
I have a line of code that gets the following error when run through
I have a batch file that tries to run the program specified in its
I have a .vimrc file that contains the following line: syntax match proper /\s[A-Z][a-zA-Z]*/
I have the following commands in a batch file: C:\MI2\Stream\bin\Debug\Stream.exe 19 C:\MI2\Stream\bin\Debug\Stream.exe 20 C:\MI2\Stream\bin\Debug\Stream.exe
I have created following command line to run cron job after every 2minutes 2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.