When executing an external app, how do I keep stdout with its child process

I running an external application from java, but I want the stdout to remain with the child process. This app spawns its own output window where it displays its own output and error messages. I'm running the app using the following code:
Process p = Runtime.getRuntime().exec(command, null, workingDirectory);
But the Process class grabs the stdout and stderr of the application it runs and holds on to them.
Any suggestions on how can I still run the program without Java grabbing the application's stdout and stderr streams?

In Windows, this works for me.
I don't remember why it is so convoluted, but this is what I came up with:
// Closes after completion
Runtime.getRuntime().exec(
        new String[] { "cmd", "/C", "start", "/WAIT", "cmd", "/C", command } ).waitFor();
// Waits for you to close the command prompt window
Runtime.getRuntime().exec(
         new String[] { "cmd", "/C", "start", "/WAIT", "cmd", "/K", command } ).waitFor();where command can be any internal command, executable, batch file.
Edited by: baftos on Feb 2, 2009 4:31 PM

Similar Messages

  • My ex's Apple ID plus password request keeps coming up on my iPhone when trying to download Apps, how do I get rid of it please?

    My ex's Apple ID plus password request keeps coming up on my iPhone when trying to download Apps, how do I get rid of it please?

    Tks heaps for that, had a look at Store and ITunes sections, not overly helpful unless I am missing something.
    My issue is that on my computer she would update her iPhone with Software updates via iTunes.
    I have gone and deleted her backups that were still sitting on there.
    If I want to update my Apps on my iPhone when due her Apple ID and password request will come up as an option to use that account if I knew the password and it's synced from my Computer even though she has been gone 7 months now. Is it a syncing issue or is her Apple ID stored in my iTunes backups somehow and keeps coming back? Do I need to de-authorize her account from my Computer?

  • When logged into Aruba Central, how do I search IAPs with a particular label?

    Q: When logged into Aruba Central, how do I search IAPs with a particular label?
    A: This is a very common request from many of the Aruba Central customers. For example, an administrator wants to quickly look at the status of all IAPs serving the guests in the campus? Or If he wants to immediately track down the IAPs only in the warehouse.
    In such cases, this feature would be really handy and helps us to give immediate glance of the required IAPs.
    How does this work ?  
    For Aruba Central, to help in such cases, one needs to first assign the access points with appropriate labels.  As we discussed above, all IAPs in the warehouse, can be labeled with a label string as  "warehouse". Similarly, an IAP in the guest lobby, can be labeled with a "lobby IAP" label.
    Aruba Central would then group these IAPs in the backend and index the seacrh, to be ready to pull up the list when you search with a particular label.
    Now, here is how you search the list of IAPs with a particular label:
    1. On the Central web interface, next to search text box, is the "Filter" icon.
    2. Click on the "Filter" icon and it would list out all the labels that has been assigned across devices.
    3. Select the label you need to search for and click on search.

    CarterFamily,
    Essentially, unless something odd is going on, the issue might be an incorrect Registry key entry.  If that is the underlying cause of the problem, then correcting the Registry should allow you to recover your profile.
    You might try the the following fix.
    Find, Open, and follow the procedure in the file named:  Temporary Profile Error
    Kind Regards,
    Dragon-Fur

  • Hi! I'm just having a little trouble when it comes to battery charging of my iPhone 5 with its new iOS 7! It doesn't indicates that the battery is fully charge unlike the old version of iOS! They said it should be pulsating but it's not

    Hi! I'm just having a little trouble when it comes to battery charging of my iPhone 5 with its new iOS 7! It doesn't indicates that the battery is fully charge unlike the old version of iOS! I already read some reviews and discussion about this. They said that the lightning bolt should pulsate when charging but it's not!

    Thanks for the replies. It took a while not hearing anything so thought I was alone. I have done many of the suggestions already. The key here is that it occurs on both phones with apps, and phones still packaged in a box.
    A Genius Bar supervisor also checked his Verizon data usage log and found the same 6 hour incremental use. Suprisingly, he did not express much intrigue over that. Maybe he did, but did not show it.
    I think the 6 hour incremental usage is the main issue here. I spoke with Verizon (again) and they confirmed that all they do is log exactly when the phone connected to the tower and used data. The time it records is when the usage started. I also found out that the time recorded is GMT.
    What is using data, unsolicited, every 6 hours?
    Why does it change?
    Why does it only happen on the iPhone 5 series and not the 4?
    Since no one from Apple seems to be chiming in on this, and I have not received the promised calls from Apple tech support that the Genius Bar staff said I was suppose to receive, it is starting to feel like something is being swept under the rug.
    I woke up the other day with another thought ... What application would use such large amounts of data? Well ... music, video, sound and pictures of course. Well ... what would someone set automatically that is of any use to them? hmmm ... video, pictures, sound. Is the iPhone 5 succeptible to snooping? Can an app be buried in the IOS that automatically turns on video and sound recording, and send it somewhere ... every 6 hours? Chilling. I noted that the smallest data usage is during the night when nothing is going on, then it peaks during the day. The Genius Bar tech and I looked at each other when I drew this sine wave graph on the log print outs during an appointment ...

  • How to create a window with its own window border other than the local system window border?

    How to create a window with its own window border other than the local system window border?
    For example, a border: a black line with a width 1 and then a transparent line with a width 5. Further inner, it is the content pane.
    In JavaSE, there seems to have the paintComponent() method for the JFrame to realize the effect.

    Not sure why your code is doing that. I usually use an ObjectProperty<Point2D> to hold the initial coordinates of the mouse press, and set it to null on a mouse release. That seems to avoid the dragging being confused by mouse interaction with other nodes.
    import javafx.application.Application;
    import javafx.application.Platform;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.collections.FXCollections;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Point2D;
    import javafx.geometry.Pos;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ChoiceBox;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.AnchorPane;
    import javafx.scene.layout.StackPane;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    import javafx.stage.StageStyle;
    import javafx.stage.Window;
    public class CustomBorderExample extends Application {
      @Override
      public void start(Stage primaryStage) {
      AnchorPane root = new AnchorPane();
      root.setStyle("-fx-border-color: black; -fx-border-width: 1px; ");
      enableDragging(root);
      StackPane mainContainer = new StackPane();
        AnchorPane.setTopAnchor(mainContainer, 5.0);
        AnchorPane.setLeftAnchor(mainContainer, 5.0);
        AnchorPane.setRightAnchor(mainContainer, 5.0);
        AnchorPane.setBottomAnchor(mainContainer, 5.0);
      mainContainer.setStyle("-fx-background-color: aliceblue;");
      root.getChildren().add(mainContainer);
      primaryStage.initStyle(StageStyle.TRANSPARENT);
      final ChoiceBox<String> choiceBox = new ChoiceBox<>(FXCollections.observableArrayList("Item 1", "Item 2", "Item 3"));
      final Button closeButton = new Button("Close");
      VBox vbox = new VBox(10);
      vbox.setAlignment(Pos.CENTER);
      vbox.getChildren().addAll(choiceBox, closeButton);
      mainContainer.getChildren().add(vbox);
        closeButton.setOnAction(new EventHandler<ActionEvent>() {
          @Override
          public void handle(ActionEvent event) {
            Platform.exit();
      primaryStage.setScene(new Scene(root,  300, 200, Color.TRANSPARENT));
      primaryStage.show();
      private void enableDragging(final Node n) {
       final ObjectProperty<Point2D> mouseAnchor = new SimpleObjectProperty<>(null);
       n.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent event) {
            mouseAnchor.set(new Point2D(event.getX(), event.getY()));
       n.addEventHandler(MouseEvent.MOUSE_RELEASED, new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent event) {
            mouseAnchor.set(null);
       n.addEventHandler(MouseEvent.MOUSE_DRAGGED, new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent event) {
            Point2D anchor = mouseAnchor.get();
            Scene scene = n.getScene();
            Window window = null ;
            if (scene != null) {
              window = scene.getWindow();
            if (anchor != null && window != null) {
              double deltaX = event.getX()-anchor.getX();
              double deltaY = event.getY()-anchor.getY();
              window.setX(window.getX()+deltaX);
              window.setY(window.getY()+deltaY);
      public static void main(String[] args) {
      launch(args);

  • I want to upgrade from Tiger to Snow Leopard on my 2008 MacPro. How do I avoid problems with the upgrade process?

    I want to upgrade from Tiger to Snow Leopard on my 2008 MacPro. How do I avoid problems with the upgrade process?

    #1 Do a complete bootable backup of your drive before upgrading. That way should anything happen you can revert back to the start and try again.
    Make sure you meet Snow Leopard 10.6 Technical Requirements - http://support.apple.com/kb/SP575
    You might also want to make sure you don't have software issues with SL:
    A Mac OS X 10.6 Snow Leopard Application Compatibility List - http://snowleopard.wikidot.com/

  • ORA-28750 Unknown Error while trying to execute an external app's API call?

    New to using web services in PLSQL
    Environment
    Database: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for Linux IA64: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    App Server:
    RedHat ES 3.0 and Oracle Application Server 9.0.4 (IAS release 1)
    We are designing a plsql application, that is able to call an external application's webservice APIs. We have created an oracle wallet for this, where we have successfully imported the corrrect security certificate issued by the API provider.
    All we are trying to do is to call one of the methods (LOGIN), which should login the provided user into the application and should return a valid session id. For this, I have a function, http_request, which first establishes the request to the URI. The code is failing at this call, with following error:
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1029
    ORA-28750: unknown error
    I could not find more information on ORA-28750..?
    Here is the function cal, in our application package:
    FUNCTION http_request(
    p_uri IN VARCHAR2,
    p_method IN VARCHAR2 DEFAULT 'GET',
    p_http_version IN VARCHAR2 DEFAULT NULL
    RETURN UTL_HTTP.req IS
    v_request UTL_HTTP.req;
    BEGIN
    v_request := UTL_HTTP.begin_request(p_uri, p_method, p_http_version);
    IF v_session_id IS NOT NULL THEN
    UTL_HTTP.set_header(v_request, 'SessionID', v_session_id);
    END IF;
    RETURN v_request;
    END http_request;
    Here is my anonymous block, where I tested the function with the URI parameters
    declare
    v_request UTL_HTTP.req;
    begin
    UTL_HTTP.set_wallet('file:/etc/ORACLE/WALLETS/attask', '<pwdforattask>');
    v_request := pkg_attask_api.http_request('https://streamsandbox.attask-ondemand.com/attask/api/login?username=<valid_user_name>&password=<valid_pwd>','GET',NULL);
    end;
    Please note that user name and passwords used for the above test have been tested to be correct. When I login to web interface of the URL, these values work fine.
    Any help is appreciated as I am close to hitting the wall on this!
    Thanks for your time and expertise,
    Suma

    28750, 00000, "unknown error"
    // *Cause:   An Oracle Security Server error of an unspecified type occurred.
    // *Action:  Enable tracing to determine the exact cause of this error.
    //           Contact Oracle customer support if needed.

  • Error when execute an external-facing portal

    Hello world,
    I would like to make  an external-facing portal for anonymous users who want to access to my iviews created by Visual Composer (I don't know if it's possible)). I have read some documentation about it. I began create a Light Portal Desktop and a Light Framework Page, I gave permission to user called Guest to my Role,.... When I execute this link http://localhost:50000/portal/anonymous, I have this error in Log Viewer :
    com.sapportals.portal.prt.component.PortalComponentException: Error in service call of Resource
    Component : pcd:portal_content/com.bycn.fdContentBYCN/com.bycn.fdPortalDisplay/com.bycn.fdPortalDesktop/lightDesktop/frameworkPages/lightframeworkpage/com.sap.portal.lightinnerpage/com.sap.portal.lightDetailedNavigationTree
    Component class : com.sap.portal.navigation.LightDetailedNavigationTree
    User : Guest
    My version of SAP Netweaver is 2004s 7.00 SP11
    Have you an idea please ?
    Best regards
    Francois

    Hi marcus,
    Finally i use Default Desktop Portal instead of Light Desktop Portal because his limitation, and now I can
    see my iView (it a Visual Composer iView) always for anonymous user (here "Guest"). My problem is in my
    iView I have some drop down lists filled dynamically with the java web services. In fact, it seems these web
    services don't work with anonymous user, only with authenticated user.
    From portal System Administration / System configuration, I added to alias of the web
    service a permission for 'Guest' user ("Administrator" = "Read", "End User" = "checked") and in System
    administration / Permissions /  Security Zones / sap.com / Netweaver.Portal / low_safety /
    com.sap.portal.systems.webservices / components / webservice_system, I added also permission
    for 'Guest' user ("Administrator" = "Read", "End User" = "checked"). My web sefvices don't have authentication polycies and in his property the Logon Method = "NONE".
    With these modifications, the web services don't work always. Is it possible anonymous users cannot access to back-end system through iViews ?
    Best regards
    Francois

  • BAPI exception when executing from external system.

    Hi Experts,
    I using the Function Module BAPI_MATERIAL_GET_ALL to get the Material and Plant attributes by giving Material and Plant data.I am able to get all the required
    attributes when I execute this Funtion Module in SAP but when I try to execute this
    Function Module from external system I am getting all the details except plant details.
    When I give plant data the Function module is throwing the below exception.
    java.lang.Exception: BapiWarning: I:MM:376 0001
       (0001 is the plant value)
    Please help me out over this issue.
    Thanks,
    Kiran.

    Hi ,
    i think u are getting this error
    W MM376 No planning data exists in plant 1000, u will get this message only if u pass the plant values to this FM , bcos its trying to get planning data from this plant.
    Regards
    Prabhu

  • The app notification keep popping up when I am another app, how can I stop it. I downloaded it but it still pop up.  It's very annoying...

    The app notification keep popping up even after downloading, how can I stop it?  Thanks

    go to Settings > Notification Center > scroll down to the app that is causing the problem > Alert Style and touch the word None under the left-most image of an iPad.  An oval will appear around the word to indicate that this is what you have selected

  • When using the iTunes app, how can I share a video on favebook?

    The only way I see to share is by email, unless I go to YouTube via safari?  Am I missing something?  Also speaking of facebook what is the preferred app to use? I see a few different ones at the  app store and which one is the most like YouTube?

    1. System Preferences > Other/ Flash Player > Advanced >  Delete  All
         Press the "Delete All" button
         Install Adobe Flash Player.
        http://get.adobe.com/flashplayer/
        Quit Safari.
        Restart computer. Relaunch Safari.
    2.  Enable Plug-ins
         Safari > Preferences > Security
         Internet Plug-ins >  "Allow all other plug-ins
    3. Check  whether you are currently  in  YouTube HTML 5 trial.
         http://www.youtube.com/html5
        At the bottom  left of the page  uncheck the box beside
       "You are currently in the HTML5 trial".
    4. Reset Safari.
        Click Safari in the menu bar.
        From the drop down select "Reset Safari".
        Uncheck the boxes beside all items.
        Check the box beside "Remove all website data".
        Click "Reset".
    5. Turn off Extensions, if any.
        Safari > Preferences > Extensions
         Now try YouTube.
    Best.

  • How do I find the device for my iPad 2? When I found the app, it stated that it worked with iPhone, iPod, and iPad2.

    I downloaded the iPad2 app for Firefox, have gone into my MacBook, opened it up, set the preference, and then it wanted the numbers for the device. Where do I find the numbers?
    Then I found no iPad2 listed. The information on the App Store stated that it definitely was available for iPad2, but no luck syncing it.
    I do have the bluetooth up and running, but will that serve to sync? Should I go ahead and run a normal sync.

    Whow what a shame, I thought this iPad was going to be terrific.  Guess I'll get out my trusty Cannon from now on, lots less hassle.
    Thank you for the reply!

  • I have a thick blue line running across my screen when click onto my apps how do I fix

    How to fix

    Sounds like a broken screen.  If you've tried Apple's basic troubleshooting steps (restart, reset, restore from backup, restore as new) and the problem persists, bring the phone to Apple.

  • How to read a DVD with a external drive, how to read a DVD with a external drive

    Hello
    I replaces my internal DVD drive with a SSD drive.
    When I start the dvd program player or a software like Toast, I get , of course, an error message.
    I saw on internet the way to edit (with HewFiend program) and change this
    /Système/Bibliothèque/Frameworks/DVDPlayback.framework/version/A/DVDPlayback
    but it still doesn't work.
    How can I use an external DVD drive ? (and burner)
    thanks

    No doubt it would be cheaper to add an External like a Lacie or one from any number of manufactures
    You can if you choose have a new CD/DVD Drive and burner installed and there are several different vendors that will do this for you or you can do it your self.
    http://www.mcetech.com/?gclid=CPzAh92mg4YCFQqQJAod-kVOhw
    Here is one, but there are literaly hundreds of places that do this.
    Don

  • How can I set up itunes to maunally sync, we have had to buy a new pc, which wants to erase and save when we connect the nano, how can I keep old files on Nano?

    Can anyone tell me how I can stop itunes syncing and erasing the data on the nano now we are on a new pc?

    I think you only have two choices when you hook up an iPod to a computer. One is to sync to it, which will replace all of the content if it's a different computer from the one where the iPod content came from in the first place (your situation). The other is to not sync, which I think is for people who may want to use their iPods as storage disks, the way you might use a USB thumb drive these days. In that case, you wouldn't replace your content with what is in the iTunes of the new computer, but you also won't be able to put additional content on.
    There is one new wrinkle with later versions of iTunes. You can transfer iTunes Store purchases from an iPod to a new computer, but it won't do the same for non iTunes Store purchases, like the CDs you burned. Those will have to be transferred to the new computer and synced back to the iPod. Since you have to do that anyway, you might as well just transfer all of your iTunes content from the old computer to the new one, and then take the time to sync all the content back onto the iPod. If you do it at night, you won't be troubled by the delay.
    If you have content on the iPod that you no longer have (maybe your old computer crashed before you could back it up), there are some programs that claim to be able to transfer all content from iPod to computer. I've only seen them mentioned here on the forum, so searching here or on Google might be a start.

Maybe you are looking for

  • Problem with variable substitution.

    Hello, I asked this before but now I want to change the question focus. I have scenario from IDOC to XML file. The scenario is digital invoice for our company in Mexico and I end this scenario with java mapping that I import from SAP marketplace. Now

  • ITunes on Win 7 64 bit will not sync Google Contacts to iPad

    This was particularly infuriating for a few solid hours one evening. I had originally synced my iPad to a Macbook Pro. I sold the MacBook, and had to do a warranty swap @ the Apple store with the iPad. This meant I needed to sync my new iPad with iTu

  • Microsoft Offic error message

    Hi, I downloaded some bad application on my new intel 17" 2 GHz C2D machine and then my word wouldn't work at all. So I went to the application file where the 2004 office was stored and then tried excel etc. and they were all dead. So I restarted my

  • Import Java Classes impossible?!

    Hello all! I tried in Forms 6i to use the option "import Java Class". But i always get the error-message PDE-UJI001, which I didn't find in any documentation. This error occurred on two different systems, in Win2000 and Win98. null

  • How to test Java Proxy Classes in Portal

    I have created a Java Project in NWDS and have added Java Proxy classes for BAPI_EMPLOYEE_GETDADA. I have created a main class to call the Java Proxy Classes. I have noticed that I can not export it as .PAR file so I exported it as .JAR file. Now I l