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

后端 未结 9 608
误落风尘
误落风尘 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 03:10

    MJB

    Please try this

    1. In eclipse "Right click" on the text file u wanna use, see and copy the complete path stored in HDD like (if in UNIX "/home/sjaisawal/Space-11.4-template/provisioning/devenv/Test/src/testpath/testfile.txt")

    2. put this complete path and try.

    3. if it works then class-path issue else GOK :)

提交回复
热议问题