• Post Reply Bookmark Topic Watch Topic
  • New Topic

Open a File in disguise using Runtime.exec("Start file")

 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, when u use
Runtime.exec("start g:\readme.txt")
u could find a corresponding Dos prompt opened with the title "start g:\readme.txt".I want my application to opened as it is done using windows,without this dos prompt.Please help me out.
Happy middling with java.
Netharam
 
King Tan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Runtime rt = Runtime.getRuntime();
rt.exec("cmd.exe /C g:\\readme.txt")
or
rt.exec("command.com /C g:\\readme.txt");
:roll:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!