Running Java file and capturing output

Discussion in 'Perl Misc' started by marie, Feb 21, 2007.

  1. marie

    marie Guest

    Hi,

    I need to call a Java class and capture the output it generates and
    send it to a file.
    I tried using the system command:

    system("/usr/local/bin/java, </var/log/MyJavaClass', &> /var/tmp/
    history.html");

    However i get the following error:
    sh: /var/log/MyJavaClass, &> /var/tmp/history.html: cannot open

    Does anyone know what I am doing wrong?

    I am running this script from Unix,

    Marie
     
    marie, Feb 21, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rick Strahl [MVP]

    Capturing ASPX output from another page

    Rick Strahl [MVP], Jul 9, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    582
    Steve C. Orr, MCSD
    Jul 9, 2003
  2. Andy Fish

    capturing the output of a JSP

    Andy Fish, Feb 11, 2004, in forum: Java
    Replies:
    4
    Views:
    2,196
    Chris Smith
    Feb 11, 2004
  3. Replies:
    0
    Views:
    454
  4. Hoegje
    Replies:
    2
    Views:
    22,850
    Gianni Mariani
    Dec 5, 2003
  5. Eric
    Replies:
    3
    Views:
    743
  6. Kyle Schmitt
    Replies:
    9
    Views:
    251
    Pablo Q.
    Aug 6, 2008
  7. Mav
    Replies:
    22
    Views:
    653
  8. Replies:
    1
    Views:
    234
    Brian McCauley
    Jul 2, 2005
Loading...