You are using bad exec signature (that with enviroment variables). Move your -h
to command
array.
I think that value returned from Perl script not depends on way you call it from Java.
To be sure your script is executed, just try with a very simple script - you can write something on disk to check if it is called, and then you can try with capturing some output to stdout.
Be aware that p.waitFor()
can cause deadlock, beceause executed command can wait for you to receive its output to stdout and waitFor will wait until command ends.
Analyse your perl script to find out where it returns code 255.
Fast research gives me information, that Perl exits with code 255 when die
function is used - this can be a tip.