String[] driver = new String[] {
"C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "X", "Y", "Z"};
for (int i = 0; i < driver.length; i++) {
try {
Runtime.getRuntime().exec(
driver[i] + ":\\Program Files\\Internet Explorer\\IEXPLORE.EXE " +
filePath); //filePath要绝对路径,可以用个File对象得到该file的绝对路径
}
catch (Exception ex) {}
把这个加在一个按钮的行为事件就行了,,或者是其他组件的触发事件。
"C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "X", "Y", "Z"};
for (int i = 0; i < driver.length; i++) {
try {
Runtime.getRuntime().exec(
driver[i] + ":\\Program Files\\Internet Explorer\\IEXPLORE.EXE " +
filePath); //filePath要绝对路径,可以用个File对象得到该file的绝对路径
}
catch (Exception ex) {}
把这个加在一个按钮的行为事件就行了,,或者是其他组件的触发事件。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货