Just wondering, if there is something better, newer, safer, faster, etc than Runtime.getRuntime().exec().
I want to run another process from my application on linux, and this is the only way i know how. Would be nice to have an alternative.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How about ProcessBuilder?
A bit more:
Introduced in Java 1.5, allows you to gain more control on the process environment – set the working directory, let you redirect the error stream to the input stream (from java POV) and a few more things.
From Oracle’s site: