【发布时间】:2016-10-26 10:24:54
【问题描述】:
我想获取 .exe 的绝对路径,我使用了 file.getAbsolutePath() 但给我
Users/Username/Documents/workspaceN/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/NameProject/lib/name.exe
但我只想要这个:
/Users/Username/Documents/workspaceN/NameProject/lib/name.exe
我该怎么做?它在 Java 应用程序中可以正常运行,但在 Web 应用程序中却不能。
【问题讨论】:
标签: java path absolute-path