Hi all, I've serious doubt in executing perl scripts in java. I got to know, that using scalar refernce in Java, the array can be passed to perl. After this, i want to execute the perl in java using Getruntime.exec() command
My question is using JDK, i'm not able to execute this java code. What package i need to import in java, to run scalar refernce & running the perl after that
I'm pasting a sample code, of what i need to do. Please help me out in this
To pass the array to perl using scalar referencing
public class arrayforPerl {
perl void max( int[] data ) {{
# Get the array elements
#
my @arrPerl = GetIntArrayElements( $data );
}} ## double braces are for the perl code
void maxProg() {
int[] data = {101, 99, 42, 666, 23};
max( data );
}
public static void main(String[] argv) {
arrayforPerl javaPerl = new arrayforPerl();
javaPerl.maxProg();
}
}
Executing Perl Script
Runtime.getRuntime().exec();
Sorry if i'm not clear, i can explain you again