【问题标题】:Root is not accessible in j2me exception在 j2me 异常中无法访问根目录
【发布时间】:2013-08-05 11:23:38
【问题描述】:
FileConnection fc = (FileConnection)Connector.open("file:///C:/products.dat",Connector.READ_WRITE);
if(!fc.exists())
{
    fc.create();
    OutputStream os=fc.openOutputStream();
    byte[] b=response.toString().getBytes();
    os.write(b);
    os.flush();
    fc.close();
}

【问题讨论】:

    标签: java-me j2mepolish


    【解决方案1】:

    您提供的路径似乎不是有效的根。 要检查设备中所有有效根值的列表,请调用 FileSystemRegistry 的 listRoots() 方法。

    其他原因可能是 FileSystemRegistry 无法访问该路径(磁盘错误或读保护)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-06-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-30
      • 1970-01-01
      相关资源
      最近更新 更多