reading and writing to file within a jar archive
I am trying to create a jar that reads from a text file within itself and I am really battling.
I have an application that I know reads from these files just fine when it isn't all wrapped up as a jar and the minute I try to package it it won't read. Is this at all possible?
The application will read the files when they are in in the same directory as the jar, but not when they are contained within the archive itself. :confused:
Is it also possible to get a jar to write to a file contained within itself? I imagine this would involve having to unpack the archive, write to the file and repackage it. This I am less worried about as it is for logging and I really don't have an issue with the application writing logs to another file somewhere on the system.