24,923
社区成员




public static boolean openFile(File f)
{
if (Desktop.isDesktopSupported())
{
try
{
Desktop.getDesktop().open(f);
//Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler C:\\1.txt");
return true;
}
catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
return false;
}
}
else
{
return true;
}
}