If I load some (say *.txt) file to my java app, how can I inlcude it to my final executable jar to make it portable (means if I move my jar to another machine it's not required to move this *.txt file with it)?
Note that I don't need the content of file I need the file itself. And how should I write the path to this file from the code?
String path = "path/to/file/"; //Yeah it should be String
I'm using IntellijIDEA and I can include any files to my final jar but can't figure out where to place it. Thanks.