Apr 23, 2002 #1 Stevoie Programmer Joined Jun 7, 2001 Messages 68 Location 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 Joined Apr 4, 2001 Messages 154 Location 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.