I am following question to update a file content inside the jar And run following command
jar tvf <jarfileName>
and then
jar xvf <FullFilePath>
and at last
jar vuf <FolderName>/
So what exactly happening here , in jar i have structure like this
Foo.jar (root directory)
/
|->/folder1
|
|->/folder2
|
|->/foo
|
|-->/bar
|
|---->/baz
|
|------>file1
|------>file2
|------>file3
|------>file..N
After running above commands ,jar folder Structure change like this
Foo.jar (root directory)
/
|
|->/foo
|
|-->/bar
|
|---->/baz
|
|------>file1
It is deleting everything and update with only file and folder structure which was extracted.