Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Correct Command Format inside Runtime.getRuntime.exec(“ ”) block

  1. #1
    Junior Member
    Join Date
    Jun 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Correct Command Format inside Runtime.getRuntime.exec(“ ”) block

    I want to execute a command in my java program using below function.

    Process p = Runtime.getRuntime().exec();

    My command om cmd prompt looks something like

    C:\Program Files\IBM\MQSI\9.0.0.0>mqsicacheadmin IB9NODE -c clearGrid -m myMapName

    Please do tell correct format of writing above command inside exec() block am getting some error when tried.

    Thanks in advance


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    21,108
    Thanks
    52
    Thanked 2,285 Times in 2,256 Posts

    Default Re: Correct Command Format inside Runtime.getRuntime.exec(“ ”) block

    Also posted at: Correct Command Format inside Runtime.getRuntime.exec(“ ”) block
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Re: How to Navigate to a URL with Runtime.getRuntime().exec()
    By bharathpangu in forum Java Theory & Questions
    Replies: 1
    Last Post: March 19th, 2012, 12:09 PM
  2. ERROR using Runtime.getRuntime().exec("arp -a");
    By Runomante in forum What's Wrong With My Code?
    Replies: 0
    Last Post: April 4th, 2011, 05:09 PM
  3. Runtime.getRuntime().exec(command) - I get nothing
    By andersbk in forum What's Wrong With My Code?
    Replies: 0
    Last Post: October 7th, 2010, 08:47 PM
  4. How to Navigate to a URL with Runtime.getRuntime().exec()
    By Flash in forum Java SE API Tutorials
    Replies: 4
    Last Post: October 5th, 2009, 07:18 PM
  5. How to Navigate to a URL with Runtime.getRuntime().exec()
    By Flash in forum Java Code Snippets and Tutorials
    Replies: 4
    Last Post: October 5th, 2009, 07:18 PM