You can access a file in one of your application's JAR files (assuming it is on the classpath) using a stream opened using ClassLoader.getResourceAsStream(resourcePath)
.
However, you cannot update a file in a JAR file. Or to be more accurate:
updating a JAR (using the Java SE libraries) entails rewriting it,
there are many situations where a application won't be able to write to its JAR file,
even if it can do it, the application may only see the results of the updates after it has been restarted, and
it is a bad idea for an application to update itself in this way for various reasons ... including security.
If you want the file to be updateable, I suggest the following approach:
Pick a standard location for the file on the user's machine; e.g. on Linux, you might pick a hidden subdirectory of the current user's home directory.
On starting the application, see if the file exists, and if it doesn't populate it from the copy in the JAR file.
When the application then needs to read or update the file, read or update it at the above location.