Update a file inside a JAR in a specific directory with jar command

前端 未结 6 653
礼貌的吻别
礼貌的吻别 2020-12-13 02:35

So I\'ve been looking high and low for an answer to this and obviously haven\'t found a satisfactory answer.

The problem is that I want to update a JAR (or any file

6条回答
  •  执笔经年
    2020-12-13 02:50

    It works , but its not the extact solution you are looking at.

    Instead of manually creating folder structure , i am asking to mention the whole path ,so mkdir will create folder and sub-directories too.hope this helps....

    set /p Folder=where you want to move inside jar 
    set /p File=Mention path of file to be moved 
    set /p Jarfile=Where is your jar file
    mkdir %Folder%
    copy %File% %Folder%
    jar -uvf %Jarfile% %File%
    rd /s /q %Folder%
    rmdir %Folder%
    

提交回复
热议问题