How to capture Runtime.exec() output? doesn't seem to work?

This is the first time I've used Runtime.exec();
Here's the code:
Runtime rt = Runtime.getRuntime();
            process = rt.exec(jobCommand);
            BufferedReader input = new BufferedReader(new InputStreamReader(process.getInputStream()));
            String line=null;
            while((line=input.readLine()) != null) {
                 System.out.println("OUTPUT: " + line);
            int exitVal = process.waitFor();
        } catch(Exception e) {
             e.printStackTrace();
        }//end catchas you can see, this is just copied and pasted out of the standard example for this method.
When it gets to the line:
while((line=input.readLine()) != null)
it doesn't read anything. However, when i run the SAME exact command from the windows CMD prompt i get a ton of output.
what am i doing wrong here?
thanks.

Welcome to the forum!
>
as you can see, this is just copied and pasted out of the standard example for this method.
>
No one can see that - you didn't post a link to the example you said you copied.
>
it doesn't read anything. However, when i run the SAME exact command from the windows CMD prompt i get a ton of output.
>
No one can see what command you are talking about; you didn't post the commnd or even describe what output you expect to get.
>
what am i doing wrong here?
>
What you are doing wrong is not providing the code you are using, the command you are using or enough information about what exactly you are doing.
No one can try to reproduce your problem based on what you posted.

Similar Messages

  • Exec-timeout doesn't seem to work

    I've been having a devil of a time getting exec-timeout to clear idle vty/ssh sessions. This investigation started when we were rolling out new Catalyst 4507R+E switches with Sup7L-E's under IOS XE 03.04.02.SG (what they shipped from the factory with.) Idle SSH sessions on the vty lines were not being cleared, despite the config being:
    line vty 0 4
     access-class VTY_ACL in
     exec-timeout 30 0
     logging synchronous
     length 0
     transport input ssh
    So I opened a TAC case, and eventually they referred to bug CSCug31122. This wasn't terribly satisfying, as we are not talking about new or revolutionary functionality, and a general distribution release on a mature platform. Clearing an idle session does not require the most sophisticated programmer at Cisco. But this led me to do more tests, and I have yet to find a hardware/IOS combination where this works correctly. So far I have failures for:
    4507R+E/Sup7L-E/IOS XE 03.04.02.SG, both vty and console lines
    3560/12.2(40)SE, vty lines with ssh
    3750/12.2(44)SE6, vty lines with both telnet and ssh
    3845/12.4(24)T6
    This seems more than coincidence. Is there something I am missing, or is this an unusually complicated programming issue?

    Hi,
    Did you reload the SALTCONFIG file from the updated SALT deployment file with the wsloadcf command? If not, you will still be using the old value until you update the SALTCONFIG file.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • How to add a delay, sleep() doesn't seem to work

    I need to add a 1 second delay before calling a next function like
    [self playStop];
    sleep(1);
    [self playGo];
    But it just pause 1 second and then execute both playStop and playGo. Any idea?

    Sleeping on the main thread is not a good idea as it will block UI updates as well - try using a timer instead:
    [self playStop];
    [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(playGo) userInfo:nil repeats:NO];
    Andreas

  • Anyone know how to capture old footage that doesn't have "timecode"?

    Anyone know how to capture old footage that doesn't have "timecode"?

    The time code will be present once the video has been imported, but to do that you need to use an analogue to digital converter such as, for example, the ADVC110.
    As you will be using Final Cut Express and not iMovie, you should post in the FCP forum.
    I have asked the Hosts to move this thread to that forum.

  • SQL Batch doesn't seem to work; How to eager-fetch related objects?

    Hi,
    I have two technical questions with Kodo.
    1. SQL Batch doesn't seem to work. I have tried batch size of -1, 0, 1, 25.
    But the performance from batch creating objects is not affected by batch
    size.
    kodo.jdbc.DBDictionary: BatchLimit=25
    2. How to use custom fetch groups to eagerly fetch related persistable
    objects? Example only showed attributes, not relationships.
    Enviroment:
    * Kodo 3.1.0 RC1
    * Oracle 9i release 1.
    Qingshan Luo
    Senior Software Engineer
    Open Harbor
    1123 Industrial Road
    San Carlos, CA 94070
    Phone: 650-413-4251
    Fax: 650-413-4298

    try poracle 10g driver. At least they fixed terrible CLOB bug may be batch
    to. BTW 9.2.x has problem with batching with deferred constraints so be
    careful
    "Greg Campbell" <[email protected]> wrote in message
    news:c3dmnu$rmj$[email protected]..
    >
    "Qingshan Luo" <[email protected]> wrote in message
    news:c3dg7q$mdl$[email protected]..
    Hi,
    I have two technical questions with Kodo.
    1. SQL Batch doesn't seem to work. I have tried batch size of -1, 0, 1,25.
    But the performance from batch creating objects is not affected by batch
    size.
    kodo.jdbc.DBDictionary: BatchLimit=25You may be running into a bug in the Oracle 9.2 driver. That driverdoesn't
    reliably give update counts when using batching and prepared statement
    caching. By default, Kodo will turn off batching. You can manuallyenable
    batching by setting the BatchLimit on your DBDictionary, as you've done.If
    you do this, though, you may want to turn off prepared statement cachingby
    setting MaxCachedStatements to 0 (see
    http://www.solarmetric.com/Software/Documentation/3.1.0RC1/docs/ref_guide_dbsetup.html#ref_guide_dbsetup_builtin).
    >
    2. How to use custom fetch groups to eagerly fetch related persistable
    objects? Example only showed attributes, not relationships.You can find information on setting up eager fetching of relations at
    http://www.solarmetric.com/Software/Documentation/3.0.3/docs/ref_guide_
    perfpack_eager.html
    Basically, you'll need to add the relations to your fetch group, and
    set the eager fetching mode.
    Enviroment:
    * Kodo 3.1.0 RC1
    * Oracle 9i release 1.
    Qingshan Luo
    Senior Software Engineer
    Open Harbor
    1123 Industrial Road
    San Carlos, CA 94070
    Phone: 650-413-4251
    Fax: 650-413-4298

  • How do I remove the menu button? The Customize option doesn't seem to work for that.

    How do I remove the menu button? [That IChing looking three line icon on the toolbar.]
    The toolbar Customize option doesn't seem to work, and it seems a waste to have a button that duplicates the menus. I'd like to swap it out for the NoScript icon.

    Hi, ''I can't recommend that you do it'', but If you really are determined, [http://www.tweakguides.com/Firefox_12.html this article] may help.

  • How do you close programs with new iOS7? Old way doesn't seem to work!

    How do you close programs with new iOS7? Old way doesn't seem to work!

    After double tap home button, swipe up on the app card that appears above the icon.

  • How to reset the iPad - the Location Services doesn't seem to work?

    How to reset the iPad - the Location Services doesn't seem to work?
    I can not get NFL Game Pass or Siri to work???

    Well you can plug it into itunes and under summary tab hit RESTORE. This should fix any software issues that you may be experiencing. About gamepass, I dont know, I dont have it. Siri is not on the IPAD2. Only on the 3rd generation Ipad, so you wont have it(going by ipad2 under your name).

  • How do you reset/repair javascripts? Enabling doesn't seem to work

    When I enter various websites, they list an advisory message that I must enable javascripts in order to use their sites. When I enable javascripts from the contents section from tools in firefox, it doesn't seem to work. How can I reset or repair the javascripts function in the firefox program to allow me to access and use various websites?

    The website you mentioned http://www.arbitersports.com is opening fine (see attached screenshot) without any error messages or warnings on my Win Xp & Firefox 9.0.1..
    -> [[JavaScript]]
    * http://kb.mozillazine.org/JavaScript
    -> [[Using the Java plugin with Firefox]]
    -> Perform the suggestions mentioned in the following articles:
    * [https://support.mozilla.com/en-US/kb/Template:clearCookiesCache/ Clear Cookies & Cache]
    * [[How to clear the cache#w_clear-the-cache|Clear the Network Cache]]
    * [[Troubleshooting extensions and themes]]
    Check and tell if its working.
    -> Update Firefox to the latest version (9.0.1)
    * [[Updating Firefox]]
    -> Update All your Firefox Plugins
    * https://www.mozilla.org/en-US/plugincheck/
    * '''When Downloading Plugins Update setup files, Remove Checkmark from Downloading other Optional Softwares with your Plugins (e.g. Toolbars, McAfee, Google Chrome, etc.)'''
    * Restart Firefox

  • My 2 year old has deleted my 'apps store' icon and I cannot figure out how to get it back? Doesn't seem to be available in the on-line apps store, ironically enough

    My 2 year old has deleted my 'apps store' icon and I cannot figure out how to get it back? Doesn't seem to be available in the on-line apps store, ironically enough

    He dragged the icon out of the dock at the bottom and disappeared. That icon is merely a "shortcut" that opens the application when you click on it.
    You still have the app. Open your applications folder and look for the App Store app icon. Click and hold down on the App Store icon and drag the icon down into the dock to replace it. That puts the shortcut back into the dock.

  • Hi, I have photoshop CC. It's the french version but I would like to have it in english. I went in the creative cloud to change the language but it doesn't seem to work. Do you know how i could do it ?

    Hi, I have photoshop CC. It's the french version but I would like to have it in english. I went in the creative cloud to change the language but it doesn't seem to work. Do you know how i could do it ?

    Please indicate whether or not the following link helps... I have not had to use it and so I do not know if/when it does help.
    Creative Cloud Help / Adjust the install language | Creative Cloud applications | CCM -
    http://helpx.adobe.com/creative-cloud/kb/change-installed-language.html

  • HT1296 How can I transfer a ringtone from my iPad to my iPhone? Syncing doesn't seem to work.

    How can I transfer a ringtone from my iPad to my iPhone? Syncing doesn't seem to work.

    See this discussion: https://discussions.apple.com/message/22514325#22514325

  • I would like to cancel my subscription for Adobe ExportPDF Subscription that I have just signed up for as it doesn't seem to work with my system. How do I do this ?many thanks suslucie

    I would like to cancel my subscription for Adobe ExportPDF Subscription that I have just signed up for as it doesn't seem to work with my system. How do I do this ?many thanks suslucie

    Hi Susan,
    I checked using the email you provided, and there's no history of any orders under that email address. (Then, I removed your email address from you post, since this is a public forum and it's best not to broadcast contact information.)
    I'll message you privately, and you can send along your email from Adobe if you'd like.
    Best,
    Sara

  • How to reflect db changes - Verify Database doesn't seem to work

    I have changed a database (MS SQL Server) column from varchar 255 to varchar 1000, but the designer doesn't pick up the change.
    I read that db changes can be picked up by using 'Verify Database' feature. It doesn't seem to work for us though. Is there any configuration to turn on for the feature to work properly or any work-around to refresh the database changes?
    We are making the database connection using JDBC (JNDI) option since the report is being used in a Java web application.
    Any comments or insights will be very much appreciated!

    Hi Wallie,
    Thank you very much for your reply! Here are the answers to your questions.
    Are you able to create a new report off the modified database?
    ==> Yes.
    Do new reports see the changes made to the database?
    ==> No.
    Are the reports connecting directly to the database table, or is it a stored procedure, business view, universe being used?
    ==> Through a business view.
    By the way, after trying so many things, I was able to figure out the reason. Since the report is using a view, not directly the table, the view itself had to be recompiled to reflect the table changes so that the view could pass the changes to the report. It was a very good thing to know. Your last question could have been a very helpful insight for this issue! Thank you so much again!

  • Pdfmark code in MS Word 2008 doc doesn't seem to work properly to create Named Destination

    Hi all,
    I've been having trouble with creating Preview-compatible Named Destinations in Acrobat 9.x (see http://forums.adobe.com/thread/770470?tstart=0).  Distiller, on the other hand, appears to create compatible Destinations, so as a last-ditch effort, I tried to go back to my original source file (Microsoft Word 2008 document) to use Distiller's pdfmark functionality, to see if maybe I could finally get a PDF with Preview-compatible Destinations.
    Following instructions found elsewhere on this forum, I went into Word and inserted the following field into a test location in my document:
    PRINT "[ /Dest /testdest /View [ /XYZ null null null ] /DEST pdfmark"
    This field code is supposed to then cause a pdfmark to be inserted into the resulting PostScript and/or PDF files.  Distiller is supposed to understand this and turn it into a Named Destination called "testdest."  However, it doesn't seem to work - I don't see the pdfmark code in the PS file, and the PDF file doesn't have any Named Destinations in it.
    I'm using Acrobat 9.x on Mac OS X 10.6.5, so I tried this two different ways:
    1) Using the "Print to Adobe PDF" workflow (which replaced the "Adobe PDF Printer" from previous OS/Acrobat versions) - this automatically generates a PDF via (presumably) an API call to Distiller... and
    2) Using the "Print to Postscript" workflow to generate a PS file, which I then ran through Adobe Distiller.
    In neither case did I end up with a named destination in the PDF file, as I was supposed to.  In case #2, even the Postscript file didn't have a pdfmark embedded in it.  Thus, I'm assuming that perhaps this is particular issue may be a problem with MS Word 2008 rather than with Acrobat... but I'm hoping someone might have a clue as to how to fix it.
    I welcome ideas on how to get Word 2008 to properly output pdfmark code, so that Distiller will pick it up and properly embed a Named Destination into the PDF...
    Thanks in advance.
    (If anyone has ideas about the Preview-compatible problem, linked above, that would also be great!)

    You're suggesting that it was never fixed from Word 2004 to 2008?  Possibly.  I wonder if it's fixed in Word 2011?  Anyone know?  But is it really a Word problem, rather than a Distiller issue?
    I appreciate your offer, though I do have access to Word on Windows (2003, I think), so I could try Distilling there... I only worry about formatting, since there are minor differences (e.g. font kerning, etc.) between Mac and Windows that are subtle, but sufficient to create formatting issues for very long documents (e.g. pushing figures onto the wrong pages, etc.).  That would be a rather big problem.
    The question remains whether this is an issue with Word or Distiller, though... and whether it's fixed in Distiller X and/or Word 2011.
    Adobe, care to comment?
    I'd really love to find a proper Mac solution, if one exists... it would be rather a slap to Mac users if a solution doesn't exist.

Maybe you are looking for

  • Earpice Volume Too Low!!

    I switched from Verizon and a RAZR phone to the iPhone last week and the earpiece volume is TOO low!! I can only hear well in a quiet room or when I use the Headphones, but in a restaurant holding the phone up to my ear, forget it, very low volume. H

  • TCP WITH 6K2 CONTROLLERS- PARKER

    Hello, I am using 6K2 controller for co-ordinated motion of an XY table. Parker has a document detailing the specs of Ethernet communication at following location: http://www.parkermotion.com/manuals/6K/6K_Ethernet_Specs1p3.doc I can communicate with

  • Installation of OBIEE 11.1.1.6 in HP Unix

    Hi, I want to install OBIEE 11.1.1.6 in a HP-Unix machine.So anyone please tell me what are the software required for the installation of OBIEE 11.1.1.6 and how to install it? Can anyone please tell what are the prerequisites required for the install

  • I need to change the email address my iPhoto is registered to.

    I have changed my email & Apple ID but I cannot update iPhoto as it is registered to my old adress. Any suggestions?

  • Photoshop action

    Hello all, I have this script bellow and it's do all right but, when it complete the action in Photoshop the script stop. I would like to know if, my delete line is in wrong place. i Guess yes but, i don't know where i have to put this. Thanks set in