String path = "";
String separator = "";
Properties p = System.getProperties();
separator = p.getProperty("file.separator");
path="路径";//请用separator转换一下"/"符
File delFile=new File(path);
try{
if(delFile.exists()){
delFile.delete();
strMsg="文件存在";
}else{
strMsg="找不到文件";
}
}catch(Exception e){}
String separator = "";
Properties p = System.getProperties();
separator = p.getProperty("file.separator");
path="路径";//请用separator转换一下"/"符
File delFile=new File(path);
try{
if(delFile.exists()){
delFile.delete();
strMsg="文件存在";
}else{
strMsg="找不到文件";
}
}catch(Exception e){}
路径是: D:\resin-1.2.3\doc\mycom那我的path 应该怎么设?不太明白用separator转换“/”符