For this Normally I used the command jar uvf app.war c:/key.txt
This command copy key.txt
file to the app.war folder.
But I want, Key should copy to the sub folder of the app.war
.
For example after unzipping app/WEB-INF/key.txt.
Asked
Active
Viewed 1,649 times
0

Mark
- 3,609
- 1
- 22
- 33

Tamanna Iruu
- 191
- 3
- 4
- 12
-
possible duplicate of [how to add a java class to a folder within a jar file](http://stackoverflow.com/questions/1044243/how-to-add-a-java-class-to-a-folder-within-a-jar-file) – Schabowy Apr 19 '14 at 08:43
1 Answers
2
You have to create directory WEB-INF
beside war archive and put there your file key.txt
.
Then simply execute jar uvf app.war WEB-INF/key.txt
Reference: Updating a JAR File

Schabowy
- 121
- 1
- 3
-
-
-
That's not an error, that's the detail about the added file you asked for with 'v'. And the algorithm is deflated not deflected. – dave_thompson_085 Apr 19 '14 at 11:31