I would like to know how to create a jar file that preserves the file permissions of its content.
I'm packaging up source and executables in a jar file that will be extracted before use. People should be able to immediately run the examples and demonstrations by running batch / shell script files. Then they should be able to modify source and re-compile everything.
I'm trying to make life easy for people who use it and this includes people who are new to Java and programming who might be working on Linux / Unix.
I have access to machines running Windows and Linux. I don't use Linux a lot so maybe I've done something wrong.
I created a jar file on Linux using jar cf .... after setting permissions on the files so that everything worked as needed. Then I created a new test directory and extracted the jar file contents into it. The file permissions were not preserved ... i.e. -rw-rw-r--