What's the bid deal you ask? Why not just use Winzip or WinRAR.. those can open up JAR files. Well, you can open the JARs up, but you can't fix them once you've broken them. If the need is to have a JAR file you can place on your build path, sneaking in a class file and the zipping it up wont work. No matter how cute you try to get naming your zipped file. The reason this does not work is that every JAR has a manifest file automatically created in it. And Winzip just doesn't play right with manifest files.
What you need to do is use the JAR utility that comes with JDK. This way you can insert you class file and create a new JAR that your application can pick up.
1) use the following command to "unzip" or expand your jar:
> jar xf
This will cause the contents of the JAr to be extracted in the current directory.
2) Make your changes .. replace class file.. whatever.
3) use the following command to "zip" or create your new jar:
jar cf jar-file input-file(s)/folder
Of course, the Sun site has detailed information.
You could also use the u parameter to update only the files you need.
jar -uf