Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to modify Spring Boot bootRepackage jar file?

I want to modify application.properties of a jar file after build a spring boot application. I had used jar xf to extract the jar file then modified the properties file but after jar-ed ( jar -0cf ), it had not been working with printout:

no main manifest attribute, in < filename >.jar

So is there anyway to do it and how?

like image 733
lethanh Avatar asked Nov 09 '22 04:11

lethanh


1 Answers

Jar file is just an zip file. You can open it and add file using any of tools that manipulate zip files.

Or if you want to update using jar command line you can do it using this syntax.

jar uf jar-file input-file(s)

Like described here:

https://docs.oracle.com/javase/tutorial/deployment/jar/update.html

like image 120
Slavus Avatar answered Nov 14 '22 21:11

Slavus