[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

How to send a command to windows console?

like:

c:\haha.avi

to open a movie
0
Knightley
Asked:
Knightley
  • 4
1 Solution
 
zzynxSoftware engineerCommented:
Runtime.getRuntime().exec("cmd.exe /c c:/haha.avi"); on a windows machine
0
 
zzynxSoftware engineerCommented:
Sorry:
Runtime.getRuntime().exec("cmd.exe /c start c:/haha.avi");
0
 
zzynxSoftware engineerCommented:
And
Runtime.getRuntime().exec("cmd /c start a.doc");  // to start Word
Runtime.getRuntime().exec("cmd /c start http://www.yahoo.com"); // to start the browser
Runtime.getRuntime().exec("cmd /c start mailto:someone@aol.com"); // to start your mail program
0
 
KnightleyAuthor Commented:
thanx
0
 
zzynxSoftware engineerCommented:
Thanks for accepting
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now