java获取相关位置

new File("").getAbsolutePath()  +"\\adb\\adb.exe" 取得项目所在位置的绝对路径 

Hack.class.getResource("/").getPath() +"adb/adb" 获取 该class所在位置的路径

getClass().getResource("/").getPath()

猜你喜欢

转载自blog.csdn.net/hx_superman/article/details/79036365