Where to see the output of batch file run in java

I use RunTime.getRunTime.exec() to run a batch file, it seems going fine. But I can not see the output of the batch file. For instance, the batch file is to print sth on the screen, but it wont display under java.
Why and how?
Thanks

You get the Process and from that yoo use getInputStream().
You need to read the stream in a seperate thread since if it fills the buffer it blocks the thread (which would be your main thread.)

Similar Messages

  • Where to see the output of my Application Engine Program ?

    Folks,
    Hello. I am creating my first AE program in Application Designer and test it in the 2-tier mode. I open the AE program in Appication Designer and click Edit ->Run Program. Then open the log file to see its execution and know the AE program is running out. But I don't know where to see the output of the AE program.
    The AE program is only executing a SQL "select" statement. Its output is the ResultSet of the SQL.
    Do any folks know where to see the output of the AE program ?
    Thanks in advanced.

    The AE program is only executing a SQL "select" statement. Its output is the ResultSet of the SQL.
    Do any folks know where to see the output of the AE program ?The output of the select didn't go anywhere. You have to actually do something with the values selected. App Engine selects them and puts them in memory (if you tell it to through %Select), but where those values go depends on you. If you have a DoSelect, then your next action may be an SQL insert/update/delete or even another %Select. If it is another %Select, then I would expect your next action to be Call Section or PeopleCode.
    If you just want to select data and print it to the app engine log file, then I would setup a step with a DoSelect/%Select and then a PeopleCode action. In your PeopleCode action, use MessageBox(0, "", 0, 0, "The value in field MYFIELD is " MYREC_AET.MYFIELD);
    I wrote a blog post a few years ago with additional tips and tricks for AppEngine output: http://jjmpsj.blogspot.com/2008/05/appengine-output-tricks-reporting.html.

  • Windows task scheduler to run batch file running a java program

    I have created a batch file that runs my SendEmail program. The batch file is in the same directory as the java program. The only line in the batch file is
    java SendEmail
    This works fine from the command prompt but from the windows task scheduler it fails to function. Any help on how I can overcome this problem will be greatly appreciated.
    THanks

    Looks okay. The classpath is set, too, I guess? Btw, try running javaw instead of java. I may err, but I think it can show a console, so you can watch any error messages.

  • Iam not able to run a simple batch file from within java

    This is how my code looks like.
    It does'nt give me any error but I dont see the output from batch file which is suposed to be a simple redirection of dir command...
    package mypackage1;
    import java.io.File;
    public class RunBatch
    public RunBatch()
    try{
    Runtime rt = Runtime.getRuntime();
    String cmd = "generate_invoice";
    String path = "C:\\application\\Maps\\Reports";
    File file = new File(path);
    String[] envp = {""};
    String[] args = {"C:\\application\\Maps\\Reports\\generate_invoice.bat"};
    System.out.println("************ executing batch ");
    Process proc = rt.exec(args);
    System.out.println("************ batch executed ");
    }catch(Exception e)
    e.printStackTrace();
    * @param args
    public static void main(String[] args)
    RunBatch runBatch = new RunBatch();
    }

    Runtime.exec() only can run executable files. Batch file is not an executable - it is a script executed by command interpreter (cmd.exe). So, you should execute "c:\windows\system32\cmd.exe /c C:\application\Maps\Reports\generate_invoice.bat".
    Denis
    http://www.excelsior-usa.com/jet.html
    JVM with AOT compilation

  • HTTP adapter: where to see the transformed output message

    All,
    I am a beginner in Webservices/HTTP interfaces in PI. I have to make changes on an existing custom interface which uses HTTP adapter. I have done the changes in the message mapping and tested it using the test tool. It seems OK.
    However when we do end-to-end testing, data is flowing but  bussiness needs a copy of the transformed data that has been sent out from PI.
    I checked RWB->Message Monitoring-> Integration server(Database) and it showed the successful message. When I drilled further into this message, it showed the SOAP message (Version 0 and Version 1 with payload). The payload showed the data that ECC had sent to PI and not the transformed data that went out from PI to 3rd party via HTTP adapter.
    Appreciate if you could guide me in right direction regarding where to see the Output/Transformed data that is actually sent to third parties.
    I have checked SXI_MONITOR as well in PI but that also shows the payload only and not the transformed data.
    Regards
    SK
    Edited by: Shirin K on Feb 18, 2010 3:10 PM

    Hi ,
    Go to particular message in SXI_MONITOR. In Message there will be window on left hand side. There will be Technical Routing.
    Technical Routing> Payloads->Maindocument. This shows the Output data.
    If you are not able to see Technical Routing inform you basis team they need to do some configuration in SXMB_ADM
    Edited by: Rajhans Abhay on Feb 18, 2010 4:29 PM

  • Where to see the size of the file in XI system

    where to see the size of the file in XI system..i mean after sending it into XI....
    Edited by: Harsha reddy on Jun 25, 2008 5:51 PM

    Hi,
    You can UDF like in Message Mapping to get the file size.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","SourceFileSize");
    fileSize = conf.get(key);
    You have to mention adapter specific attribute for file size in file adapter.
    How to retrieve file size and XI message ID?
    Kulwinder
    Reward if Helpful

  • Cannot see the output file in my first project

    Hi,
    I follow the instructions of Exercise in Chapter 4 of CAP-0501 to make the project. I wonder why I cannot see the output file in 'C:\CAPExercises\0501\exercises\Active_Project\Output'.
    There are two things I would like you know.
    1. I do not have the file 'prjFileXferInput.xml', but find and copy a xml file. Is this a problem? Does CAPS have any special requirement on schema for the input file?
    2. Is '\' and '/' a problem for Java CAPS? I notice the book using 'C:/CAPExercises/0501/exercises/Active_Project/Output�, while it is 'C:\CAPExercises\0501\exercises\Active_Project\Output' on windows. I am working on a standalone Windows 2000 computer.
    By the way, can anyone give me a confirmation that '/' and '\' is not a problem for Java CAPS, as the server or application take care of it? Is it true?
    Thanks,

    I am answering my own question. The project works.

  • Not able to see the output

    Hi all
    when i run my request using XML Report Publisher .request completes without error.
    but when i see the output it shows me a message dialogue box saying
    File does not degin with '%PDF-'
    though my template is of rtf type.
    any idea
    pls help

    What is the Output type of the concurrent program ?
    check if that is PDF?

  • Where to see the transaction code for a script

    Hai my dout is  where to see the transaction code for a script after assigning to  a drive programm for example i see output for medruck in me11 and for other standard scripts where can i see the  output is there any table avaible to check it

    Hi masthan,
       for sd and mm related scripts. u can use tnapr.
    Otherwise go to nace transaction u can find the script name as well as program name.
    Or u can try with TSTC table, which will give the t/c's.
    Regards...
    Arun.

  • Can't see the output of cast/multicast

    Hi, I can't see the output of cast/multicast.. but in sql*plus, i can..
    regards

    Hello, here's a sample...
    ops$rringor@RLR9204> create or replace type
    2 myarraytype as table of varchar2(2000)
    3 /
    Type created.
    ops$rringor@RLR9204> drop table t;
    Table dropped.
    ops$rringor@RLR9204> create table t
    2 ( id number not null ,
    3 name varchar2(10) ) ;
    Table created.
    ops$rringor@RLR9204> begin
    2 for i in 1..10
    3 loop
    4 insert into t values ( i, i||'abc');
    5 end loop;
    6 end;
    7 /
    PL/SQL procedure successfully completed.
    ops$rringor@RLR9204>
    ops$rringor@RLR9204> select a.id,
    2 CAST( MULTISET( select b.name
    3 from t b
    4 where b.id = a.id ) as myArrayType ) as names
    5 from t a ;
    ID NAMES
    1 MYARRAYTYPE('1abc')
    2 MYARRAYTYPE('2abc')
    3 MYARRAYTYPE('3abc')
    4 MYARRAYTYPE('4abc')
    5 MYARRAYTYPE('5abc')
    6 MYARRAYTYPE('6abc')
    7 MYARRAYTYPE('7abc')
    8 MYARRAYTYPE('8abc')
    9 MYARRAYTYPE('9abc')
    10 MYARRAYTYPE('10abc')
    10 rows selected.
    I can see the records under NAMES but I can't view it using SQLDeveloper.

  • How to see the output of a FORM of REMITTANCE ADVICE ( PAYMENT ADVICE )??

    Hi Experts,
    I got a SAP Script of REMITTANCE ADVICE (also known as PAYMENT ADVICE).
    And I know the VENDOR #.
    I need to see the output of this SAP Script on the screen, so, let me know that, How to test it/see its output. (I know, seeing the Customer statemet from the tx of F.27), I mean, wht r the transactions etc. stuff.
    thanq

    You should create a variant for payment advice and you can use the same while executing the t.code:F110.
    Once payment run has been completed system will generate a spool for payment advice. You can view that payment advice through t.code:SP01.

  • Report to see the output of VLPOD transaction

    Hi Gurus
         I have configured Proof of delivery concept to caputre loss of Quantity due to moisture. can any body tell me about standard report to see the output of VLPOD transaction.Full points for the correct solution.

    Hi,
    Try the t-code VLPODL, hope can help you!
    Good day
    Tao

  • Not able to see the output in sost when sending the image in email body

    I am sending the image in email body and when m trying to see the output in SOST then it showing a page 'you are not connected to the internet'
    I am able to see the output when m saving local objects but when m saving it in some package its showing me this page
    Kindly help it
    Regards
    Pratham Kapoor

    Hello Prakash,
    Thanks for the reply
    I am able to see the mail in SOST but when I click on the Display Document to see the content of the mail then I am getting this error of 'you are not connected to the internet'
    My Program is to put the logo in my email body
    I am sending you the attached image

  • How can I see the information about a file used in a sequence?

    How can I see the information about a file used in a sequence?

    You can use pretty much any two or multiple button mouse on a Mac, right out of the box.
    I use this one: http://www.apple.com/mightymouse/

  • I can no longer see the top menu bar in itunes.  where you see the status of syncing.  where you have the option to click and move a song you are playing to the middle of the song, etc.

    I can no longer see the top menu bar in itunes.  where you see the status of syncing.  where you have the option to click and move a song you are playing to the middle of the song, etc.

    It's iTunes screen menubar:

Maybe you are looking for

  • Problem in set comment  as mendatory

    i hv working on a project i.e. approval system in which some hierarchy are there. there are 3 action on approval like: approve all, reject ,back when we approve data it's only goes into log table not saved in date base. when i press save button it co

  • Embedding image in PDF works fine in CS2 but not CS3

    When we create a PDF from CS3 with the images embedded and then open it on a CS2 machine it warns us about the fact that the file was created in a newer version of illustrator and then opens the file. When we try and open the file on a CS3 machine it

  • Qosmio G30-158: Is it possible to watch digital TV with Qosmio Player?

    Living near Paris,I recently bought a QOSMIO G30-158 PC, with hybrid tuner, and although it is quite easy to watch digital tv programs with Windows Media Center, I do not understand why Qosmio Player can only watch analogic programs, but not digital

  • Sharing photos from apps to Facebook

    I have several photo apps but none of them seem to let me share a photo to one of th pages I admin, only my personal page. This makes no sense so i assume I'm missing something Thx Paul

  • Domain name registrar

    I am about to register a Domain name, it is available. However, looking at all of the companies that do this is a little intimidating. So I am asking anyone who has any experience with this for some advice. What I want is just the Domain name not any