Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java to Perl and then back to Java

Status
Not open for further replies.

natalia2k

Programmer
Sep 5, 2005
8
IN
Hi,

Am new to Perl, and currently I need to know if its possible to use Perl from Java for few processing and then return back to the Java Program.

Its like Java is my main application and it invokes Perl and needs to pass an object or any argument. This object will be used by Perl for some processing and after its done, it will return another object back to Java.

Is this possible?

I understand that its possible to "use" a Java class in a Perl module, but my main concern is passing an instance back to Java.

Thanks in advance.
 
The simple answer is "yes".
Can you tell us what platform this has to run on?
Windoze or Unix or Linux (etc)?



Trojan.
 
Try this:
Code:
Process p = Runtime.getRuntime().exec("perl sample.pl");
InputStream in = p.getInputStream();
And so on.


Trojan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top