Linux调用本地程序打开文件的wps、txt、图片、pdf
1、打开wps、txtString str[] ={"/bin/sh","-c","wps "+path};Runtime.getRuntime().exec(str);2、打开pdf、图片(本人为方便直接用的火狐打开、如果安装其他查看工具,可选择其他工具打开)String str[] ={"/bin/sh",&quo
·
1、打开wps、txt
String str[] ={"/bin/sh","-c","wps "+path};
Runtime.getRuntime().exec(str);
2、打开pdf、图片(本人为方便直接用的火狐打开、如果安装其他查看工具,可选择其他工具打开)
String str[] ={"/bin/sh","-c","Firefox"+path};
Runtime.getRuntime().exec(str);
更多推荐
已为社区贡献1条内容
所有评论(0)