I need to store data into files inside .jar file and read it again.
I know that I can use Class.getResourceAsStream() method but it returns an Inp
Class.getResourceAsStream()
Inp
It is unlikely that you can change a loaded jar safely. Changing it while it is being used is not a good idea.
If you want to do this, use a plain file system directory and add/remove files from it. Even this may not work as you expect.