Java Source Code – Is the Source Code of jar.exe Available?

cjavasource code

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?

Best Answer

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.

Related Topic