Update the contents of JAR Files

Command for updating the contents of JAR File

jar uf jar-file-name.jar File(s)_to_add


  • jar indicates to call the jar tool.
  • u indicates to update the content.
  • f indicates to extract from the file.
  • File(s)_to_add indicates the name of the files that should be updated to the jar file.


jar uf myjar.jar Sound.class


The contents of Jar File will be updated.

Other commands

  • v indicates to verbose information about updated files.


    jar ufv myJar.jar Sound.class


    adding: Sound.class(in = 225) (out= 184)(deflated 18%)

Working of other commands like 'M','m','0' are similar as creating JAR Files. You can refer the page Creating JAR Files.