Say I have a jar call it foo.jar
which contains a folder structure>
---com
|---company
|---jar
|---metadata
|---service
|---config
|---foo.xml
I then try to read the file from my code with
FileOutputStream file = new FileOutputStream("/path/to/jar/foo.jar!/com/company/jar/metadata/service/config/foo.xml")
This fails with java.io.FileNotFoundException foo.xml(Permission denied)
The jar in question has: -rw-r--r--
(644 if you prefer numeric)
What is causing this permissions problem? How can I fix it so as to avoid this happening in the future. And how do I configure mavan/intelliJ to install maven dependencies in such a way that this problem does not occur.