How to access images from a resource folder in intelliJ IDEA without having to give entire path name

后端 未结 1 449
后悔当初
后悔当初 2021-01-12 23:49

How would I do something like this in intelliJ IDEA

File file = new File(\"C:\\Users\\Account\\Documents\\ProjectFolder\\ResourceFolder\\image\");

相关标签:
1条回答
  • 2021-01-13 00:13

    You should use Java resource loading system. This is not depending on your IDE. Once you have marked a folder as resource folder in IntelliJ, it is available in your code as via resource loader.

    0 讨论(0)
提交回复
热议问题