Browse DevX
Sign up for e-mail newsletters from DevX


Tip: Updating a JAR File

See how to update a JAR file with an easy command.


At times, requirement to update an already-delivered JAR file will need to be handled. Of course, JAR file is a way of packaging and delivering Java class file and related metadata files in a package. But having an easier way is always welcome by the developer group.

The following command, when executed on a command line, will update a JAR file with 1 or more files as needed:

jar uf jar-file input-file-name(s)

uf          :    indicates update and file
jar-file    :   the jar file that needs to be updated
input-file-name(s)   :   the name of file(s) that needs to be updated in the jar file. 


Visit the DevX Tip Bank


Sridhar M S. is a Java developer from Bangalore, India. He holds a master's degree in Computer Science.
Thanks for your registration, follow us on our social networks to keep up-to-date