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: Reading input from a CMD operation?

  1. #1
    Junior Member Yulfy's Avatar
    Join Date
    Feb 2012
    Location
    Dublin
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Reading input from a CMD operation?

    Hello Community,

    I'm currently trying to get a java program to store lines of text from a CMD operation ( ping test ) in a String variable so I can preform checks on it. I unforunatly have no clue how to read said operation in a java program ( I'm fairly new to java ). Any ideas?

    Cheers,
    Yulfy.


  2. #2
    Member
    Join Date
    Dec 2011
    Posts
    50
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default Re: Reading input from a CMD operation?

    It is possible to catch the CMD's output within a Java program. Read document about Runtime.exec() and the Process class.

Similar Threads

  1. Reading input from console (greek chars)
    By lemmyz in forum File I/O & Other I/O Streams
    Replies: 10
    Last Post: August 16th, 2010, 05:37 AM
  2. [SOLVED] java me how to: input - math operation - output
    By Lifer in forum Java ME (Mobile Edition)
    Replies: 3
    Last Post: April 7th, 2010, 05:36 PM
  3. reading string input then casting it to an int?
    By etidd in forum Java Theory & Questions
    Replies: 2
    Last Post: March 27th, 2010, 11:49 PM
  4. Reading String Input?
    By Morevan in forum Java Theory & Questions
    Replies: 1
    Last Post: January 18th, 2010, 12:16 PM
  5. reading JMF input streams?
    By wolfgar in forum File I/O & Other I/O Streams
    Replies: 0
    Last Post: January 12th, 2010, 12:22 AM