Java tutorial
//package com.java2s; import java.io.IOException; public class Main { private static Process process; private static void initProcess() { if (process == null) try { process = Runtime.getRuntime().exec("su"); } catch (IOException e) { e.printStackTrace(); } } }