How do I use java to execute a perl script. Thanks a bunch :)
Asked
Active
Viewed 952 times
1 Answers
8
Without knowing any more of the requirements:
Runtime.getRuntime().exec("/path/to/perl /path/to/perl/script");
Documentation about Runtime.exec
: http://download.oracle.com/javase/6/docs/api/java/lang/Runtime.html#exec(java.lang.String)

wkl
- 77,184
- 16
- 165
- 176
-
1Adding to answer -- You may want to use newer api -- ProcessBuilder. Passing arguments, processing out/err streams etc are better in this API – Jayan Oct 18 '10 at 08:07