Question


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Question

  1. #1
    Anthony Saffer Guest

    Question


    I am writing an application in a language that will remain nameless *g*.
    But it interfaces with a console based Java app and I have a problem. The
    main program (not written in Java) calls the Java program as an external
    program. The Java program does it's thing then SHOULD return a string to
    the calling program. Problem is, it doesn't. I could be going about this
    all wrong though so could someone please point me in the right direction.
    Here is what I am doing with my Java program:

    1: The calling program is passing 1 argument to the program when it calls
    it.

    2: The Java program is retreiving information based on the argument value
    passed to it.

    3: The Java program SHOULD return a string to the calling program.

    Can't I return my string to my calling prgram using standard System.out.println?
    If not, how do I do it?

    Thanks,
    Anthony

  2. #2
    Paul Clapham Guest

    Re: Question

    Yes, you can write to the Java program's console using System.out.println.
    Whether the other program can read that output is another question which we
    obviously can't answer here. If it can't, then you could redirect the Java
    program's output to a file and have the nameless program read that file
    instead.

    PC2

    Anthony Saffer <casaffer@rectec.net> wrote in message
    news:39ff6b5e$1@news.devx.com...
    >
    > I am writing an application in a language that will remain nameless *g*.
    > But it interfaces with a console based Java app and I have a problem. The
    > main program (not written in Java) calls the Java program as an external
    > program. The Java program does it's thing then SHOULD return a string to
    > the calling program. Problem is, it doesn't. I could be going about this
    > all wrong though so could someone please point me in the right direction.
    > Here is what I am doing with my Java program:
    >
    > 1: The calling program is passing 1 argument to the program when it calls
    > it.
    >
    > 2: The Java program is retreiving information based on the argument value
    > passed to it.
    >
    > 3: The Java program SHOULD return a string to the calling program.
    >
    > Can't I return my string to my calling prgram using standard

    System.out.println?
    > If not, how do I do it?
    >
    > Thanks,
    > Anthony




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center