0

Possible Duplicate:
How should I call a Perl Script in Java?

Hi,

I am currently working on a project that needs to invoke a perl script from java. Is there a way by which I can get the output of a Perl script in the java program I am running? I have tried different ways by which it can be done but I couldn't get a conclusive answer. I am working on a windows machine.

Thanks!!

Community
  • 1
  • 1
  • 1
    Many questions have already been answered on SO. Please use the search before asking a question, you may find your answer instantly. – Brian Roach Apr 15 '11 at 05:39

1 Answers1

1

Google ProcessBuilder class and example of its usage. Get output stream of the Process -- which is inputStream for java process, so process.getInputStream() -- this is your Perl script output.

Vladimir Dyuzhev
  • 18,130
  • 10
  • 48
  • 62