This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi All, I am involved in an application where i need to run exe file thru java but the problem is if the directory has spaces between it like d:\Progam Files it doesnot run. So while running it only checks d:\program and not d:\program files, my code is Like this : String sysCommand = new String("cmd /c start Synlook -F SyncXML.xml -A Import"); ... ... Runtime r = Runtime.getRuntime(); Process p = r.exec(sysCommand); synlook is my exe file and rest are parameters. prashant
You can reference the directory by it's DOS name (on Windows) where "program files" = "progra~1" (and if you have a new folder call programmitic it would probably be progra~2, etc.). Sean
Joined: Jan 23, 2001
Hi Sean, thats true but, this works out fine when i know the directory in which the exe file is going to be installed ,This is an installable application so i don't know where the user is going to install it.Thanks for the response. Prashant