I have a project that I use/export as a jar in an other project. In the jar project, I want to list some files .txt contained in one of my project directories.
How can I do that ? I made some researches but I only found solutions to list files in a jar, but not from the jar in question.
I tried to make a file using MyClass.class.getProtectionDomain().getCodeSource().getLocation().getPath() + "\MyRepertoryWithTxtFiles" and then using File.listFiles() but it makes a null pointer exception.
Hope my problem is understandable and thanks in advance for any suggestion.