Hi,
I'm interested in checking out the new PerlNatives stuff in Inline::Java to see
whether it can help me call some Perl code from Java-land. More specifically, I know
I can do something like the following, where Perl is the top level:
Perl
|-----> Java
|------> Perl
But can I do this?
Java
|-----> Perl
|------> Java
In other words, I want to create a perl interpreter from a Java program, and ask it to
compile & run some perl code.
I did get as far as the following:
---------------------------------------------
import org.perl.inline.java.*;
public class CallPerl {
public CallPerl () throws InlineJavaException { }
public static void main (String[] args)
throws InlineJavaPerlException, InlineJavaException
{
System.out.println("Hello");
InlineJavaPerlInterpreter pi
= InlineJavaPerlInterpreter.getInstance();
}
}
---------------------------------------------
However, I get a runtime exception:
---------------------------------------------
Exception in thread "main" org.perl.inline.java.InlineJavaException: Can't initialize
PerlInterpreter functionnality: PerlInterpreter extension
(/opt/perl/5.6.1/lib/auto/Inline/Java/PerlInterpreter/PerlInterpreter.so) can't be
found
---------------------------------------------
Any tips? I indeed don't seem to have a PerlInterpreter.so on my system - should I?
-Ken