d0x d0x - 1 year ago 111
Java Question

How to edit the content of an application.properties or application.yml file inside an existing jar on a remote Linux server

How to edit a property file (like

) inside of an existing jar file on a remote Linux server.

Imagine the jar is located in
and I like to change the username inside of




How to open the file and change the property?

Answer Source

A .jar file is simply a .zip file with a different extension, and vim can edit zip files and their contents directly! Simply vim your .jar, use the file navigator to find your properties file and change it. vim will maintain the zip with your edits.

See here for more details.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download