Runtime examples

Hi,
Can someone provide an example on how to execute a command that has several options and arguments with it through the Runtime.exec() command?
I have a command with many options and the syntax of some of them work from the shell env, but not from java (i.e. wrong argument error, ...etc.). Passing the whole command as one string is not working (probably because it is tokenized).
Can someone provide an example on using exec(String [] commandArray) method, for a command and some of its arguments?

This is from my working project:
I have an executable "opt.exe" that takes a parameter, I also want to run it by multiple threads so I have several directories each has a copy of "opt.exe". That brings the need to pass the directory to each thread. I do it in a batch file "opt.bat" that looks like this:
(on Windows machine)
cd %1
opt %2
(on AIX machine)
cd $1
opt $2
This batch file sits right above those directories. I execute it in my java code like this:
Runtime runtime = Runtime.getRuntime();
Process process = null;
try {
if (NT) {
process = runtime.exec( BAT_FILE + " " + directory + " " + param);
else {// AIX machine
process = runtime.exec("ksh " + BAT_FILE + " " + directory + " " + param);
where BAT_FILE contains opt.bat with its full path("C:\\opt.bat"), directory is the working directory that I want the opt.exe to run (full path also), param is the parameter for "opt.exe".
PC

Similar Messages

  • How to make the page blank field in runtime

    Dear
    when i will run the page the fields shoud come with blank Field.
    i want to make it in runtime.
    example- i have one page having employees data. but when i will run that page the data will not come only blank fields should come,

    rakesh,
    af:panelformlayout
    see the naveeth comments.
    You are following a wrong design for your application.
    If there are no rows in the VO instance, show the message as 'There are no rows'.
    What is the use-case that you have - in order to do the same for all the pages in the application.

  • System Parameters at runtime...

    Hi Dear,
    Well I am here to ask you another thing. I am trying to send my reports to different departments of my organizations through emails; I am calling this report from a form through RUN_PRODUCT options available.
    I am facing one problem and that is how to change SYSTEM PARAMETER of report at runtime by getting input from user through a form.
    Like I have a report, I have change its SYSTEM PARAMETER as:
    DESFORMAT : pdf
    DESTYPE : MAIL
    DESNAME : [email protected]
    This thing is working OK when I call this report through form by using this code:
    RUN_PRODUCT(REPORTS,'C:\WINDOWS\Desktop\TEST_MAIL',SYNCHRONOUS,batch,FILESYSTEM,SCREEN);
    It run fines, but it only e-mail on the given address [email protected]
    I want to take this e-mail input from user and then I want to change the system parameter DESNAME through this value.
    How can I do that, please reply this mail as soon as possible. I have to develop this report very urgent. I am using Developer 6i.
    with lot of thanks,
    Imran

    Add a non database item in your form to hold the values of the mail a user inputs. Then in the code to run the report add :
    add_parameter(parameter_list_id,'DESNAME',text_parameter,:block_name.item_name);
    Also change the execution mode of your reports in the object navigator of your forms to runtime .
    When you execute the RUN_PRODUCT built-in change also the batch parameter to runtime ; example :
    run_product(REPORTS,'un_doc_journalier',SYNCHRONOUS,RUNTIME,FILESYSTEM,fact_id,null);

  • Issue with STOR using FTP & TLS

    Currently I've developed a small FTPSClient class which basically extends Apache's FTPClient. After a lot of work, I was able to get connected, log in, etc. Now, I'm having a problem sending a file to the FTP server (data channel protected.)
    Here is RFC 4217's guideline for doing so:
    12.7.  A Firewall-Friendly Data Transfer with Protection
                  Client                                 Server
         control          data                   data               control
       ====================================================================
         PASV -------------------------------------------------------->
                                                 socket()
                                                 bind()
             <------------------------------------------ 227 (w,x,y,z,a,b)
                          socket()
         STOR file --------------------------------------------------->
                          connect()  ----------> accept()
             <-------------------------------------------------------- 150
                          TLSneg()   <---------> TLSneg()
                          TLSwrite()  ---------> TLSread()
                          TLSshutdown() -------> TLSshutdown()
                          close()     ---------> close()
             <-------------------------------------------------------- 226Here's a runtime example from the client:
    INFO  12-28-06 2:29:52,644 PM - Connecting to xxx.xxx.xxx.xxx : 20021
    INFO  12-28-06 2:29:59,404 PM - Attempting to connect to xxx.xxx.xxx.xxx on port 20021...
    INFO  12-28-06 2:30:01,557 PM - 220 <<<Connect:Enterprise UNIX 2.2.00 Secure FTP>>> at bcftweb1 FTP server ready. Time = 14:31:18
    INFO  12-28-06 2:30:01,557 PM - Issuing 'AUTH TLS' command
    INFO  12-28-06 2:30:01,647 PM - 234 AUTH TLS-C/TLS OK.
    INFO  12-28-06 2:30:07,365 PM - Starting handshake...
    INFO  12-28-06 2:30:07,655 PM - 200 PBSZ 0 OK.
    INFO  12-28-06 2:30:08,066 PM - 200 PROT P OK, data channel will be secured.
    INFO  12-28-06 2:30:08,066 PM - Attempting login as FRONDUN
    INFO  12-28-06 2:30:08,316 PM - 230 Connect:Enterprise UNIX login ok, access restrictions apply.
    INFO  12-28-06 2:30:08,406 PM - Calling _openDataConnection_...
    INFO  12-28-06 2:30:08,737 PM - 150 Opening ASCII mode data connection for 2006-12-28_02.30_PM.test.dat
    INFO  12-28-06 2:30:14,275 PM - Starting handshake+...
    INFO  12-28-06 2:30:15,176 PM - Bytes transferred 53120
    ERROR 12-28-06 2:30:17,319 PM - 452 Put failed : SSL/TLS error.The results are a half-sent file lying server-side (i.e. the file is 51kb and it's anywhere from 39-50kb.) As you can see, I can at least get to the 150 reply message. This means somewhere between TLSneg() and close() something gets screwed up. I don't think it's TLSneg() because it gets past the handshake and actually sends the data. TLSshutdown() refers to close_notify and I'm told that SSLSocket.close() handles this behind the scenes. I've tried SSLSocket.getOutputStream() and just wrote to that but I ended up with the same results. Anyways here's the applicable code and if anyone has done this before I would greatly appreciate some help.
    Also , I'm in local passive mode and another odd note is that small files (< 5kb) send across fine.
        private boolean __storeFile(int command, String remote, InputStream local)
        throws IOException
              logger.info("Calling _openDataConnection_...");
            Socket tmpSocket = _openDataConnection_(command, remote);
              logger.info(this.getReplyString());
            if (tmpSocket == null)
                throw new IOException("_openDataConnection_ returned null Socket");
              FtpsSocketFactory factory = new FtpsSocketFactory(this.context);
              SSLSocket socket = (SSLSocket) factory.createSocket(tmpSocket, tmpSocket.getInetAddress().getHostName(), tmpSocket.getPort(), true);
              logger.info("Starting handshake+...");
              socket.startHandshake();
              OutputStream output = new BufferedOutputStream(socket.getOutputStream(), getBufferSize());
            if (getFileType() == ASCII_FILE_TYPE)
                output = new ToNetASCIIOutputStream(output);
            // Treat everything else as bisnary for now
            try
                logger.info("Bytes transferred " + Util.copyStream(local, output, getBufferSize(),
                                CopyStreamEvent.UNKNOWN_STREAM_SIZE, null,
                               false));
            catch (IOException e)
                try
                    socket.close();
                catch (IOException f){}
                throw e;
            output.close();
            socket.close();
              tmpSocket.close();
              return (FTPReply.isPositiveCompletion(getReply()));
        }-Bill

    I have had this issue many times too. I have found that simply exporting the HTML and uploading using a 3rd party programme like Filezilla proves much easier and faster.

  • When the page will be load how to make the page blank in run time

    Dear
    when i will run the page the fields shoud come with blank Field.
    i want to make it in runtime.
    example- i have one page having employees data. but when i will run that page the data will not come only blank fields should come, after thar i will create.

    duplicate how to make the page blank field in runtime

  • Example of AddGroup at runtime

    <p>I have been pulling my hair out trying to create a group at runtime and adding it to my report.  I am using Crystal XI and ASP.NET.  Can anyone post some example code to help me out?</p><p>Regards,</p><p>Seth </p>

    You can retrieve the loaded objects (project, tasks, checklist...) in the prepare_to_save method:
      DATA: lr_mgr TYPE REF TO cl_dpr_appl_object_manager,
            lt_proj TYPE dpr_tt_projects,
            lr_proj TYPE REF TO cl_dpr_project,
            lv_guid TYPE dpr_ts_guid.
        CLEAR gt_guid.
        lr_mgr = cl_dpr_appl_object_manager=>get_instance( ).
        lt_proj = lr_mgr->get_projects( ).
        LOOP AT lt_proj INTO lr_proj.
          lv_guid-guid = lr_proj->get_guid( ).
          INSERT lv_guid INTO TABLE gt_guid.
        ENDLOOP.
    You can replace lr_mgr->get_projects( ) BU lr_mgr->get_task( ) for your need.
    Then filter on the milestone flag.
    Regards,
    Matthias

  • DOing same function as Runtime short cut menus example except with menu ring...

    Newbie here: I am attempting to create a slide out menu much like the one in the Runtime short cut menu example (in example finder) except with a menu ring instead of the list box that is used in the example.  I have a menu ring with 8 values in it and on 3 of the option I would like a secondary menu that slides out to the side that displays another sub-menu.  Can this be done easily/efficiently?  I am looking at other alternatives but this option would be the best for my application from a user stand point.  Any help and examples would be appreciated. 
    Thank you
    Steve
    Solved!
    Go to Solution.

    What is being shown in that example is how you can modify or create your own runtime menus (aka popup menus or right-click menus) for a given control.  Basically you customize the menu and then use event cases to handle what to do for the menu selections.
    Now a menu-ring control is a different beast entirely, BUT it looks almost exactly the same, so I see why the two could be confused.  As far as I know, there's no support in a menu ring for multiple menu levels.
    Often times I find that effective labview GUI design (and well, design in general) works best with a compromise of what you imagine for what you can do easily and simply.  Flow like water: find a native control behavior that's *good enough*. 
    But! here's a hack that might get what you want.  It sounds like you want the multi-levelness of a right-click menu but without having to right-click?  Use a "mousedown?" filtering event to replace left-clicking with right-clicks!  Now when the user left-clicks, labview will tell the OS that they right-clicked.
    -Barrett
    CLD

  • Runtime bones does not work if imported by Flash (example included)

    Created a runtime bone animation (more complicated than the one included in this example).  When I loaded the swf using the Loader class in master application, the runtime animation stopped working.  The authortime bones still work.
    I included my source files for the bones, and another fla that only calls the Document class Main.as.  Try running bonesRuntime.html, and the runtime bones work; call bonesSwfLoader.html and only the authortime bones work.
    Is this a bug or a programming error?

    I found the solution at http://www.mad.com.au/blog/?p=208
    I quote: (Paul Burnett)
    Tip – loading a swf with a Bones Armature (IK) into another swf
    A few people have asked me how to load a swf file that contains an armature, into another swf file. If you just try to do it the armature doesn’t work. The trick is that you need to register the armature in the loader file. I have attached a couple of very simple files to demonstrate. The bones.swf contains a simple armiture set to ‘Runtime’. The ‘loader.swf’ loads the bones.swf and registers the armature. For more info check out the new IK class in Flash CS4.
    import fl.ik.*;
    import flash.display.*;
    //load the bones swf
    var request:URLRequest = new URLRequest("bones.swf");
    var loader:Loader = new Loader();
    loader.load(request);
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, init);
    //set up the vars
    var boneClip:Sprite;
    var myArmature:IKArmature;
    function init(e:Event):void{
         //add the clip to the stage
         boneClip = Sprite(loader.content);
         addChild(boneClip);
         //set up IK
         IKManager.setStage(stage);
         myArmature = IKManager.getArmatureAt(0);
         myArmature.registerElements(stage);
         IKManager.trackAllArmatures(true);

  • DAQmx Examples on Runtime Target

    Can the DAQmx examples from the NI Example Finder be complied and run on a runtime target?

    Some yes, some no... The finder should give you some insight into what will and what won't.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Runtime constant (Filename) errors out in BPM

    Hi,
    I have a BPMCollectTime scenario to collect the Source files. The filename (Message Mapping/Transformation) from the files is captured in TRANSFORM STEP(before sending them out from BPM). The file is sent to SEND step one at a time.
    Question : Filename of the source file is captured through user defined function.
    Following is the code.
    ================
    String  v_result_time;          //test Variable
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key =  DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    if (key == null) { v_result_time= "Create Key Failed";}
    else
    {v_result_time= "Create Key worked";
    String valueOld = conf.get(key);
    v_result_time = valueOld;
    return v_result_time;
    The Mapping gives a runtime error in the BPM. This is a sporadic error. 
    I have selected the Adapter specific attribute(File name).
    The BPM errors out sometimes? I am not sure if I am missing any setting. If I delete the work item and run the same scenario it works.
    Question 1 : What is the cause of the above error?
    Question 2 : Does BPM support Adapter specific attribute such as filename?
    Kindly Advice.
    Thanks,
    Gowri

    Hi Everyone,
    Thanks for all the help.
    DTN will not change the response filename to source filename. This option cannot be used. The correlation id is defined as response file name. Response filename is fixed for invoice file.
    Here is the example.
    For invoice file name HDTN20070430163110.TXT, response file received is nav1_2b5.rsp file. For HDTN20070430163314.TXT , response file is nav1_2b5.rsp
    So my correlation id is dummy fixed value. I have known the fact that it is not possible to use context object filename.
    Bhavesh -  I have defined transform step for accessing filename using dynamic configuration. Following is the code used in mapping.
    ================
    String v_result_time; //test Variable
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    if (key == null) { v_result_time= "Create Key Failed";}
    else
    {v_result_time= "Create Key worked";
    String valueOld = conf.get(key);
    v_result_time = valueOld;
    return v_result_time;
    ====================================
    BPM errors out sometime with following error
    Component mapping has returned error.
    com/sap/xi/tf/_MM_DTNData_2_DTNFilename_java.lang.NullpointerException.
    Error: Exception CX_MERGE_SPLIT occurred (program: CL_MERGE_SPLIT_SERVICE========CP, include: CL_
    If I delete this workitem and repeat the same scenario, it works. I have still not understood, why the scenario works sometime.
    Kindly Advice.
    Thanks,
    Gowri

  • How to execute an application in Solaris using Runtime.getRuntime.exec() ?

    I am currently doing a project which requires the execution of Solaris applications through the use of Java Servlet with this Runtime method - Runtime.getRuntime.exec()
    This means that if the client PC tries to access the servlet in the server PC, an application is supposed to be executed and launched on the server PC itself. Actually, the servlet part is not an issue as the main problem is the executing of applications in different platforms which is a big headache.
    When I tried running this program on a Windows 2000 machine, it works perfectly fine. However, when I tried it on a Solaris machine, nothing happens. And I mean nothing... no errors, no nothing. I really don't know what's wrong.
    Here's the code.
    public void doPost(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException
         response.setContentType("text/html");
         PrintWriter out = response.getWriter();
              Process process;                                                       Runtime runtime = Runtime.getRuntime();
              String com= "sh /opt/home/acrobat/";
              String program = request.getParameter("program");
              try
                        process = runtime.exec(com);
              catch (Exception e)
                   out.println(e);
    It works under Windows when com = "c:\winnt\system32\notepad.exe"
    When under Solaris, I have tried everything possible. For example, the launching of the application acrobat.
    com = "/opt/home/acrobat"
    com = "sh /opt/home/acrobat"I have also tried reading in the process and then printing it out. It doesn't work either. It only works when excuting commands like 'ls'
    BufferedReader read = new BufferedReader(new InputStreamReader(process.getInputStream()));Why is it such a breeze to execute prgrams under Windows while there are so many problems under Solaris.
    Can some experts please please PLEASE point out the errors and give me some advice and help to make this program work under Solaris! Please... I really need to do this!!
    My email address - [email protected]
    I appreciate it.
    By the way, I'm coding and compiling in a Windows 2000 machine before ftp'ing the .class file to the Solaris server machine to run.

    it is possible that you are trying to run a program that is going to display a window on an X server, but you have not specified a display. You specifiy a display by setting the DISPLAY environment variable eg.
    setenv DISPLAY 10.0.0.1:0
    To check that runtime.exec is working you should try to run a program that does not reqire access to an X Server. Try something like
    cmd = "sh -c 'ls -l > ~/testlist.lst'";
    alternatively try this
    cmd = "sh -c 'export DISPLAY=127.0.0.1:0;xterm '"
    you will also need to permit access to the X server using the xhost + command

  • How to change a Logical Port URL-Destination/Endpoint at Runtime

    Hi,
    i am looking for a way to change the endpoint for a webservice-call without redeploying my application. (I am using a standalone-proxy).
    In the SAP-Help from NetWeaver 2004s I found the following hint:
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/c487d701c7214db8ca7a741ba3c9d0/frameset.htm
    Configuring Logical Ports:
    Logical ports (LPs) contain the configuration of the client-side SOAP runtime, such as the access URL or security settings. These are required if Web service calls are executed using proxies.
    The Web service port is part of the WSDL description. This defines a URL where the service is to be called. As a rule, this URL is generated directly into the proxy object. However, this can cause problems whenever the proxy is transported into a system landscape (for example, from the test system into the productive system). In this case, the proxy would still attempt to call the Web service on the test server although the proxy should point to the productive system. The proxy could be re-generated or the coding could be changed manually. Due to the risk of errors with this method, the configuration data in the SAP Web Service Framework is separated from the implementation. After transport or re-deployment of the proxy, the URL and other important parameters can be adapted using a simple editor. 
    The LPs provided correspond to the Web service configurations created for the Web service.
    My Question:
    Where can I change the URL of the corresponding logical port at runtime?
    I don't want to redeploy my application !!!
    I want to change the endpoint-destination at runtime!!!
    In the Visual Administrator I can see the webservice in the "Web Services Container Service Administration". I also can see the different ports from the WebService-Configuration I made.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/c487d701c7214db8ca7a741ba3c9d0/frameset.htm
    But it is not possible to change the "target adresses"!
    Can anybody help me finding a solution concerning my question?
    Regards
    Steffen

    You can include below method in your code and call it.
    private void UpdateConfig(string key, string value, string fileName)
    var cFile = ConfigurationManager.OpenExeConfiguration(fileName);
    cFile.AppSettings.Settings[key].Value = value;
    cFile.Save();
    Here fileName is the full path + application name (eg: c:\project\WinApp.exe)
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer :)

  • A question about how to change a button in a JPanel during runtime

    I am a beginner of GUI. Now I am trying to change a specific component, a button, when the application is running. For example, I have 3 buttons in a JPanel. Each button has its onw icon. If I click one of them, it will change its icon, but the other two don't change. I don't know if there is any method for changing a specific component during runtime. If any one knows please let me know, I will appreciate that very much!!!

    What you're going to have to do is loop inside the actionlistener but still have accessability to click while its looping. I don't know much about it, but I think you're going to need a thread. Try something like this... (it doesn't work yet, but I have to take off)
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    class buttonxdemo extends JFrame implements ActionListener{
      Buttonx mybutton;
      //set it all up, make it look pretty  =]
      public buttonxdemo()
           mybutton = new Buttonx("default");
           getContentPane().add(mybutton.thebutton);
           mybutton.thebutton.addActionListener(this);
           this.setDefaultCloseOperation(3);
           this.setSize(200,200);
      public void actionPerformed(ActionEvent ae){
        if (ae.getSource() == mybutton.thebutton)
             if (mybutton.keepGoing)
               mybutton.keepGoing = false;
                else if (!mybutton.keepGoing)
                     mybutton.keepGoing = true;     
          mybutton = new Buttonx(/*Icon,*/"My Button");
          //getContentPane().remove(mybutton);
          //getContentPane().add(mybutton.thebutton);
          mybutton.startstop();
      }//actionperformed
      static void main(String args[])
           new buttonxdemo().show();
    } //movingicondemo
    class Buttonx extends Thread{
      public boolean keepGoing;
      //public Icon ICx;            //perhaps an array, so you can loop through?
      public String strbuttonx;
      public JButton thebutton;     //may have to extend JFrame?
      public Buttonx(/*Icon IC,*/ String strbutton){
        //ICx = IC;
        strbuttonx = strbutton;
        thebutton = new JButton(strbuttonx);
      public void startstop()
        int i = 0;
        while (keepGoing)
          thebutton.setLabel(strbuttonx.substring(0,i));
          //if an array of Icons ICx
          //thebutton.setIcon(ICx);
    i++;
    if (i > strbuttonx.length() - 1)
    i = 0;
    try
         Thread.sleep(1000);
    catch (InterruptedException ie)
         System.out.println("sleep caught: " + ie);
    }//startstop()
    }//buttonx
    kev

  • Data Mining on data specified and filtered by the user in runtime

    Hi Experts,
    i am new to Data Mining in SAP BI (we are on BI 7.0 SP Level 20). I familiarised myself with APD and Data Mining by reading some interesting and useful threads in this forum and some other resources. Therefore I got a understanding about the topic and was able to create basic data mining model for an association analysis and an corresponding APD for it and write the results into a DSO by using the data source. But for now I was not able to find a solution for a concrete customer requirement.
    The user shall be able to select an article, a retail location and a month and get the top n combinations sold with that article in the particular location and month. For that he may not access the data mining workbench or any other SAP internal tools but he shall be able to start the analysis out of the portal (preferable a query).
    We had some thoughts on the scenario. The first idea would be to create an APD for every location for the last month. As we need to cover more than 100 locations, this would not be practicable. Therefore I think it would be necessary, that the user can select the particular filters, and the data mining would then be executed with the given input.
    The other idea was to use a query as source. The user would start this query and filter location and month in it. The result of the query could then be used as the source for the APD with the association analysis. Therefore we would need to create a jump point from that query, which starts the APD with that results. After that the user should be able to start a result query, which displays the result of the association analysis (ideally this result query would start automatically, but starting it manually would be ok, too).
    So, I have the following questions for these scenarios:
    1.) Is it possible to create variants of a single APD, for automatically doing the data mining for the different locations?
    2.) is it possible to start an APD out of a query, with the particular results regarding filtering?
    3.) Can we place a query directly on the data mining results (how?) or do we need to write the data mining results in a DSO first?
    4.) What about the performance? Would it be practicable to do the data mining in runtime with the user waiting?
    5.) Is the idea realistic at all? Do you have any other idea how to accomplish the requirement (e.g. without APD but with a query, specific filter and conditions)?
    Edited by: Markus Maier on Jul 27, 2009 1:57 PM

    Hi ,
    you can see the example : go to se 80 then select BSP Application ,SBSPEXT_HTMLB   then select tableview.bsp , you will get some idea to be more clear for the code which you have written
    DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW.
    tv ?= cl_htmlb_manager=>get_data(
                             request = runtime->server->request
                              name    = 'tableView'
                                  id      = ''tbl_o_table" ).    
    IF tv IS NOT INITIAL.
      DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
      tv_data = tv->data.
    IF tv_data->prevSelectedRowIndex IS NOT INITIAL.
    FIELD-SYMBOLS: <row> LIKE LINE OF sflight.
        READ TABLE ur tablename  INDEX tv_data->prevSelectedRowIndex ASSIGNING <row>.
        DATA value TYPE STRING.
        value = tv_data->GET_CELL_ID( row_index    =
                                   tv_data->prevSelectedRowIndex
                                      column_index = '1' ).
    endif.
    endif,

  • 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.

Maybe you are looking for

  • How to set up and configure AirPort Express for AirPlay and iTunes

    Saw somewhere that supposedly there were some apple written guidlines on the above topic. I have searched all over for them. Anyone know where I can get a copy to read through. Just trying to educate myself a bit and sety up another room with access

  • Updating a record on a certain date

    Hi, I have a little problem with updating a record on a certain date specified in the same table. OK so i have a table called 'users' and in that table i have the following fields: AdID Username AdStatus AdStartDate AdPeriod (and a few more but i've

  • Lion not installing even with Snow Leopard

    im having a problem installing Lion osx on my mac mini . the mini meets all requirements .. Snow Leopard 10.6.8 1.83 Core 2 Duo 2 gig of ddr2 sdram  @ 667 mhz with over 200 gig of empty hard drive space and everytime i try to install Lion it just sim

  • LR3 error messages

    I have been successfully using LR3 until a few hours ago. Suddenly Error messages now start to appear saying an error occurred sending this file : access is denied I have uploaded files on LR3 30 times today! without any issues I have uninstalled and

  • Process only when there is a change in source file

    Hi Experts, My scenario is File to File. Requirement is, source file need to be picked up only if there is change in the data. Please guide me the approach for this. Thanks Kishore