html5 HTML5如何获取文件路径?

HTML5如何获取文件路径?HTML通过文件方法获取文件路径:文件f=新文件(这个.getClass().getResource(“/”).getPath())系统输出打印(f) 结果:C:docum

HTML5如何获取文件路径?

HTML通过文件方法获取文件路径:

文件f=新文件(这个.getClass().getResource(“/”).getPath())系统输出打印(f)

结果:

C:documents and settingsadministratorworkspaceProjectNamebin

获取当前类的项目路径

如果没有“/

file f=new file(这个.getClass().getResource(“”).getPath())系统输出打印(f)

结果:

C:documents and settingsadministratorworkspaceProjectNamebincomtest

获取当前类的绝对路径;