Java and Perl

Reapsy00

Member
Apr 12, 2005
116
0
0
Hi, I'm trying to do some programming in Java and I would like to be able to execute some perl code from it but I'm not sure how or even if this is possible. Assuming it is how would I pass data between the java and perl code? If someone could shed some light on this for me I would e most grateful.
 

akubi

Diamond Member
Apr 19, 2005
4,392
1
0
you can always run external apps from java with Runtime.getRuntime().exec(...)
javadocs

not recommended though.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
I suppose webservices are a possibility. Or you could just open up a tcp socket and fling data across. If it's possible to reverse the control and have a perl script execute java programs then you could probably pipe stuff around really easily.
 

jman19

Lifer
Nov 3, 2000
11,225
664
126
I've used the method recommended by akubi a few times, I think you should give it shot.
 

Reapsy00

Member
Apr 12, 2005
116
0
0
Thanks guys had a quick look at the runtime thing looks kind of complicated but I guess I'll give it a go