This is a jsf 2.0 project on GlassFish 3.1.2, developed with Netbeans.
In my business logic, I need to launch a perl application which returns a png or svg. This file will be displayed or presented as a file download in the UI (for which I will use primefaces).
Question: How can an external process like this perl script be launched from my jsf app?
(I have found a thread on this issue here: http://www.java.net/node/676943 but the answer was too technical, I could not understand it)
Thx!
You can use
Runtime.getRuntime().exec("perl script.pl")or you can use Process class.Look at
exitValue()andgetInputStream().