Archive for September 2nd, 2009

You are browsing the archives of 2009 September 02.

How to replace a file in a JAR file – Java Archive

While the answer seems to be very elusive it appears to be quite simple. The java jar tool is required (part of the jdk I believe) and it can be used like this:
jar uf myJarFile.jar com\vsoft\servlet\myServlet.class
This will replace the class myServlet.class inside the myJarFile.jar with a new one located in com\vsoft\servlet\myServlet.class
You may open the jar [...]