如何使用J2ME获取文件或当前工作目录的路径?
发布于 2011-09-07 15:34:53
是的,这是可能的。使用以下代码,
Enumeration drives = FileSystemRegistry.listRoots();
System.out.println("The valid roots found are: ");
while(drives.hasMoreElements()) {
String root = (String) drives.nextElement();
System.out.println("\t"+root);
}有关更多信息,请参阅本文Getting Started with the FileConnection APIs.
https://stackoverflow.com/questions/7330282
复制相似问题