Created
July 4, 2019 14:35
-
-
Save vector4wang/bbdbccac2134b665246d42654ffa39e8 to your computer and use it in GitHub Desktop.
[Java 获取项目根路径] #Java #路径
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String classFilePath = WordCount.class.getResource("/").getPath(); | |
// 获取resource下的文件 | |
String classFilePath = WordCount.class.getResource("/blsmy.txt").getPath(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment