how to add a java class to a folder within a jar file how to add a java class to a folder within a jar file windows windows

how to add a java class to a folder within a jar file


Put foo.class into a classes directory, then run

jar uvf foo.jar classes/foo.class

(I've just tried it to make sure it works. There may a way of doing it without creating the classes directory, but I think this is the simplest solution.)