Apr 23, 2002 #1 Stevoie Programmer Jun 7, 2001 68 IE Is it possible to call an exe within java, eg a user presses a button and the java program calls the explorer.exe Can this be done? Thanx
Is it possible to call an exe within java, eg a user presses a button and the java program calls the explorer.exe Can this be done? Thanx
Apr 23, 2002 #2 daimaou Programmer Apr 4, 2001 154 PT yes it can, just do something like import java.lang.Runtime; Runtime rt = java.lang.Runtime.getRuntime(); try { rt.exec("c:\\path_if_needed\\app.exe" } catch(Exception ex){ System.out.println("Error message" } hope this helps. Upvote 0 Downvote
yes it can, just do something like import java.lang.Runtime; Runtime rt = java.lang.Runtime.getRuntime(); try { rt.exec("c:\\path_if_needed\\app.exe" } catch(Exception ex){ System.out.println("Error message" } hope this helps.