Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't update files in jar in vim

I had packaged a jar with all dependencies in it by using Maven assembly plugin, after that I want to edit some configuration files enter code here in vim, but I got below errors when I saved.

error (zip#Write) sorry, unable to update /Users/boreas/IdeaProjects/hummi ngbird/target/hummingbird-1.0-SNAPSHOT-jar-with-dependencies.jar with log4j.xml

How to solve it?

like image 971
Boreas320 Avatar asked Aug 03 '15 12:08

Boreas320


People also ask

How do I force a file to reload in Vim?

If you have made modifications to the file, you can use :edit! to force the reload of the current file (you will lose your modifications). The command :edit can be abbreviated by :e. The force-edit can thus be done by :e! to make Vim automatically refresh any files that haven't been edited by Vim.

How do I update a JAR file in Linux?

The u option indicates that you want to update an existing JAR file. The f option indicates that the JAR file to update is specified on the command line. jar-file is the existing JAR file that is to be updated. input-file(s) is a space-delimited list of one or more files that you want to add to the JAR file.

What happens when a file has been deleted outside of Vim?

When a file has been detected to have been changed outside of Vim and it has not been changed inside of Vim, automatically read it again. When the file has been deleted this is not done. Read on for solutions. By default, CursorHold is triggered after the cursor remains still for 4 seconds, and is configurable via updatetime.

How to edit a file inside a JAR file?

Modifying a file inside a jar. 1 Open the jar file from vi editor. 2 Select the file you want to edit from the list. 3 Press enter to open the file do the changers and save it pretty simple.


1 Answers

Make sure you have zip and unzip installed (on Ubuntu you'd run sudo apt-get install zip && sudo apt-get install unzip).

Also make sure the file has write permissions for the current user.

like image 169
yair Avatar answered Sep 19 '22 10:09

yair