3213?1442652660

【任务】 xml file NullPointerException 正常


LiZX添加于 2015-08-04 22:23
NullPointerException occurs when reading  xml file
回复(5)
  • 3213?1442652660
    LiZX 8年前

    状态新增 变更为 关闭

  • 3213?1442652660
    LiZX 8年前

    % 完成0 变更为 100

  • 3213?1442652660
    LiZX 8年前

    don't worry, the absolute path is not hard-coded string. it is contributed by file.getAbsolutePath() of directory and the xml file's name

  • 929?1442652660
    甘谊昂 8年前

    in the test or rapid prototyping we can use , but absolute path is not accepted in final version

  • 3213?1442652660
    LiZX 8年前

    Originally, I use ClassLoader.getSystemResource() and Url.openStream() to get InputStream, meanwhile,I also add the directory where xml file is included into source path. But it did't work. Finally, I supply FileInputStream(new File()) with absolute path, and it is ok.

0?1470885445
登录后可添加回复
  • 当前状态 关闭
  • 选定优先级 正常
  • 指派给 LiZX
  • 里程碑 --
  • 开始日期 2015-08-04
  • 结束日期
  • 预计工时(H) 0.00 小时
  • 完成度 100%
  • 关联Commit

© Copyright 2007~2021 国防科技大学Trustie团队 & IntelliDE 湘ICP备 17009477号

问题和建议
还能输入50个字符 提交

加入QQ群

关注微信APP


×