I am developing a Java application on Fedora 12. This application call a lot of linux commands. As of now, I am writing a CPP application that uses the 'system()' function to execute the command. The program of this application keeps running and my Java applications passes the appropriate command whenever needed.

Other alternative I can think of is writing a shell script to do the same thing what my CPP application does.

Q1: Which of the two alternatives is better, performance wise?
Q2: Is there any other alternative anybody can think of?

Thanks and Regards,