TO READ
Two possible causes:
- you are trying to access the project.txt through java.io and not as resource (please post the code)
- you access through ClassLoader.class.getResourceAsStream("/res/project.txt"); but the file was not exported into the jar (please post the code)
in othe words: the "./res/project.txt" is near the eclipse project path but outside the scope of the jar.
TO WRITE
Finally the writing into the jar file is absolutly not Java compliant, it should work in some cases such as ear or war and not jar.