2

This may seem an odd question, but I want to create an executable which runs under Windows written in C++. The program needs to be able to update a jar file even if Java is not installed on the target machine. I have seen the src.zip in the Java JDK folder and the jar folder but this is Java code. I assume jar.exe is written in C or C++? Is it possible to see the jar.exe source code? If so where would I find that?

12

Actually, jar.exe is just a thin wrapper around a Java implementation found in the package sun.tools.jar.

But a JAR file is simply a ZIP archive with a metadata directory. You can use any ZIP implemetation such as libzip to manipulate JAR files.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.