Where to put a textfile I want to use in eclipse?

后端 未结 9 647
误落风尘
误落风尘 2020-11-30 02:31

I need to read a text file when I start my program. I\'m using eclipse and started a new java project. In my project folder I got the \"src\" folder and the standard \"JRE S

9条回答
  •  悲&欢浪女
    2020-11-30 02:58

    You should probably take a look at the various flavours of getResource in the ClassLoader class: https://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ClassLoader.html.

提交回复
热议问题