Spark exit

Hi !

I am running Spark from another application. Can anyone tell me how can I exit spark without using System.exit().I want to keep the other app runnig but I want to restart spark in another language.

Thanks