html5 HTML5如何獲取文件路徑?
HTML5如何獲取文件路徑?HTML通過文件方法獲取文件路徑:文件f=新文件(這個.getClass().getResource(“/”).getPath())系統(tǒng)輸出打?。╢) 結(jié)果:C:docum
HTML5如何獲取文件路徑?
HTML通過文件方法獲取文件路徑:
文件f=新文件(這個.getClass().getResource(“/”).getPath())系統(tǒng)輸出打?。╢)
結(jié)果:
C:documents and settingsadministratorworkspaceProjectNamebin
獲取當前類的項目路徑
如果沒有“/
file f=new file(這個.getClass().getResource(“”).getPath())系統(tǒng)輸出打印(f)
結(jié)果:
C:documents and settingsadministratorworkspaceProjectNamebincomtest
獲取當前類的絕對路徑;