我在制作一个搜索文件的程序,搜索后符合条件的文件都将显示在JTable里,我希望当我点击文件名
时能用被关联的软件来打开文件;
java能做到这一点吗?
时能用被关联的软件来打开文件;
java能做到这一点吗?
解决方案 »
- java写了个即时通讯系统,想加入语音(类似于微信对讲也行),视频功能,求指导。
- 关于Connection timed out的问题
- java如何将十六进制0xFF5100A5转换为无符号int值,貌似java不支持无符号数据
- 有关静态代码块的执行顺序???
- 请问一个JTextPanel的问题,大家帮忙看看
- 怎么使用SWT呢,在eclipse里面编译时候出现这个错误,怀疑和本底接口有关系,该怎么解决呢?
- 消除编译时的警告?
- 基础问题
- 弱智散分:谁提供能用的浮动在窗口右下角浮动层的javascript代码,立即给200分!!!
- 转贴:Applet通讯问题
- final 类
- 用了很久的JB.现在要使用ecplise了.散分给朋友们!!!
import java.io.File;
import java.io.IOException;
public class TestOpen{
public static void main(String[] args) throws IOException{
String f="G:/JBuilder/builder/copyrights.html";
Runtime r = Runtime.getRuntime();
r.exec("start "+f);
}
}
import java.io.IOException;
public class TestOpen{
public static void main(String[] args) throws IOException{
String f="G:/JBuilder/builder/copyrights.html"; Runtime r = Runtime.getRuntime();
r.exec("start "+f);
}
}
import java.io.File;
import java.io.IOException;
public class TestOpen{
public static void main(String[] args) throws IOException{
String f="G:/JBuilder/builder/copyrights.html";
try{
Runtime r = Runtime.getRuntime();
r.exec("cmd /c start " + f);
}catch(Exception e)
{ }
}
}
public static void main(String[] args) throws Exception{
String f="your file path name";
Runtime r = Runtime.getRuntime();
r.exec("cmd /c start " + f);
}
}