Java me 是否可以使用J2me获取内存卡中文件的路径?

Java me 是否可以使用J2me获取内存卡中文件的路径?,java-me,Java Me,如何使用J2ME获取文件路径或当前工作目录?是的,这是可能的。使用以下代码 Enumeration drives = FileSystemRegistry.listRoots(); System.out.println("The valid roots found are: "); while(drives.hasMoreElements()) { String root = (String) drives.nextElement(); System.out.pri

如何使用J2ME获取文件路径或当前工作目录?

是的,这是可能的。使用以下代码

 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);
  }

关于这篇文章的更多信息,请看,

我认为J2ME中没有“当前工作目录”这样的东西,这到底是什么意思?它列出了根,但不确定是否回答了他的问题。