hey i need some help how i can call any exe file from my java program. below is code given.. i want when i wrote a string to file then i want run that exe file named as "starttag.exe" .. but i getting error.. some please help me ---imran---
public static void main (String [] args) { token t = new token(); t.readMyFile(); } //end of main
// readMyFile
void readMyFile () { String record = null, mrecord=null; record = new String(); mrecord = new String(); String uinput=null; Vector v = new Vector(); try {
uinput = JOptionPane.showInputDialog("Enter a Sentance to translate");
BufferedWriter out = new BufferedWriter(new FileWriter("input.txt")); out.write(uinput); out.close();
Runtime rt = Runtime.getRuntime(); Process p = rt.exec("starttag.exe);