小编典典

类路径资源的 java.nio.file.Path

all

是否有一个 API
可以将类路径资源(例如我从中得到的Class.getResource(String))作为java.nio.file.Path?
理想情况下,我想将花哨的新PathAPI 与类路径资源一起使用。


阅读 45

收藏
2022-08-08

共1个答案

小编典典

这个对我有用:

return Path.of(ClassLoader.getSystemResource(resourceName).toURI());
2022-08-08