Hauke D I have tried the following two ways of calling a simple Perl script that currently just prints out the fact that it has been reached from a Java Application. Both attempts were found from an internet search and have not been successful - the expected output is not observed in the Linux window that starts the Java application. Just a little background - the Java code and simple Perl script were developed using the Eclipse IDE and the Perl script resides within one of the previously existing Java packages (Utils)
// First Method
List<String> cmds = new ArrayList<String>();
cmds.add("perl");
cmds.add("/home/rwest/workspace/src/AppMaint/Utils/PerlUtil.pl");
ProcessBuilder pb = new ProcessBuilder(cmds);
pb.start();
// Second method
Process p = RunTime.getRuntime().exec("perl /home/rwest/workspace/src/
+AppMaint/Utils/PerlUtil.pl");
p.waitFor();
Other things I have done in an attempt to get either method to work:
1) Changed the group (chgrp) and access rights (chmod) so that the Perl script exists in the same group as the Java application and has read and execute permission.
2)Added /home/rwest/workspace/src/AppMaint/Utils/PerlUtil.pl to the Eclipse manifest file classpath line.
3) Executed the Perl script from Eclipse IDE with success.
4) Stepped through Eclipse debugger to make sure the applicable Java application lines of code to execute the Perl script are executed.