including source files in runnable jar file

后端 未结 1 864
别跟我提以往
别跟我提以往 2021-01-25 10:03

I have to create the installer with runnable jar file ,when the jar file will run it has to copy the files on some directories. I have included few folders in the java project a

相关标签:
1条回答
  • 2021-01-25 11:09

    you have to add the required folder to the build path using following step:

    click project -> properties -> Build Path -> Source -> Add Folder

    and then use class.getResourceAsStream() to read it instead of File and FileReader.

    Hope it works !! :)

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