runtime.exec - how to open a file using exec method in java? -
c:\users\admin\downloads\vid_20160226_203631957.mp4
when execute above line in command prompt corresponding video gets played default media player.
but when try same using java runtime class doesnt work. using following method.
runtime r= runtime.getruntime(); r.exec("c:\users\admin\downloads\vid_20160226_203631957.mp4")
try this.
runtime r= runtime.getruntime(); r.exec("cmd /c c:\\users\\admin\\downloads\\vid_20160226_203631957.mp4");
Comments
Post a Comment