I have a directory, update, with the same structure as a JAR file Application.jar. Now I want to (programmatically) replace all files in Application.jar with the files in the update folder. Lets say I have the following structure for both directory and jar file:
Application.jar / update
- TestDir
- text2.txt
- text1.txt
When using jar uf Application.jar update/TestDir/text2.txt it creates a new directory in Application.jar - update - and it's going to be added all from there, even worse when using absolute paths (Creating the whole C:\ structure inside the jar file). How can I preserve the structure, is there some way to mark pathToUpdate\update as a root? I know there's the -C parameter, but I don't understand it.