java 包内路径问题
packageIO_Operation;importjava.io.File;importjavax.swing.JOptionPane;publicclassAcces...
package IO_Operation;
import java.io.File;
import javax.swing.JOptionPane;
public class AccessUtil {
// 路径src/MDB/下.
private final static String folderpath = "../MDB/";
private final static String blankMdbFileName = "blank.mdb";
public static String path;
public static boolean checkDB() {
path = folderpath + blankMdbFileName;
File x = new File(path);
if(x.exists()){
return true;
} else {
return false;
}
}
public static void main(String[] agrs){
System.out.println(checkDB() + " " + path);
//JOptionPane.showMessageDialog(null, p);
}
}
如何判断包内文件的路径??? 展开
import java.io.File;
import javax.swing.JOptionPane;
public class AccessUtil {
// 路径src/MDB/下.
private final static String folderpath = "../MDB/";
private final static String blankMdbFileName = "blank.mdb";
public static String path;
public static boolean checkDB() {
path = folderpath + blankMdbFileName;
File x = new File(path);
if(x.exists()){
return true;
} else {
return false;
}
}
public static void main(String[] agrs){
System.out.println(checkDB() + " " + path);
//JOptionPane.showMessageDialog(null, p);
}
}
如何判断包内文件的路径??? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询