0

How do I use java to execute a perl script. Thanks a bunch :)

1

1 Answer 1

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)

Sign up to request clarification or add additional context in comments.

1 Comment

Adding to answer -- You may want to use newer api -- ProcessBuilder. Passing arguments, processing out/err streams etc are better in this API

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.