#輸入要修改的jar文件
echo "Please Input jar Name:(jar/servcie.jar)"
read jarName
#輸入要修改jar內部文件名稱
echo "Please Input file Name:(config.properties)"
read fileName
jar tvf $jarName |grep $fileName
#查詢到的文件,選擇要修改的文件
echo "Query out as follows,Please select the copy you want:"
read oldFilePath
jar xvf $jarName $oldFilePath
sleep 1
#復制你需要修改的文件
echo "Please Input replace file path:(like:config/config.properties)"
read newFilePath
cp $newFilePath $oldFilePath
echo "Replace success!"
jar uvf $jarName $oldFilePath
sleep 1
java -jar $jarName &