How do I use WindowsPhotoGallery to display a gif image from Java?
I am using the following code to display a gif image in Java, calling the runtime command, it opens WindowsPhotoGallery but does not display my image, instead it shows a bunch of other images on my PC, my question is how to pass the gif image filename correctly, so it will open with my image.
Now I am passing it this way: C: \ Program Files \ Windows Photo Gallery \ WindowsPhotoGallery "C: /abc.gif"
What's wrong, what's the correct way to do it?
String Command,Program,File_Path="C:/abc.gif";
Process process=null;
Program="C:\\Program Files\\Windows Photo Gallery\\WindowsPhotoGallery ";
Command=Program+"\""+File_Path+"\"";
try { process=Runtime.getRuntime().exec(Command); }
catch (Exception e) { e.printStackTrace(); }
0
a source to share