C library for JAR files

S

Stephen Murphy

Hi,

Does anyone know of C library functions for manipulating JAR files.
Failing that can anyone point me to some JAVA code which is used for
JAR files which I could use to write a C library for that purpose.

Thanks in advance,

Stephen.
 
M

Michael Borgwardt

Stephen said:
Hi,

Does anyone know of C library functions for manipulating JAR files.
Failing that can anyone point me to some JAVA code which is used for
JAR files which I could use to write a C library for that purpose.

A JAR file is nothing but a ZIP archive that can optionally contain
some well-defined files with meta information.

So unless you need to deal specifically with that meta information
(e.g. verifying a cryptographic signature), all you need is a ZIP
library, which I'm sure is easy to find.

Sun's specification of the JAR format:
http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html
 
H

Harald Hein

Stephen Murphy said:
Does anyone know of C library functions for manipulating JAR files.

Any of the free ZIP libraries should do. In fact, Java itself uses the
free info-zip/zlib library http://www.gzip.org/zlib/

There is/was also a free software project for creating an all-C jar
replacement which was supposed to be much faster than the Java jar tool
from Sun. It was called fastjar. It has not been maintained since two
years. http://sourceforge.net/projects/fastjar/
Failing that can anyone point me to some JAVA code which is used for
JAR files which I could use to write a C library for that purpose.

There is no need for this, but if you really want to use C -> Java -> C
have a look at the packages

java.util.zip and java.util.jar
 
R

Roedy Green

If you look at the Java code for working with ZIPs, it appears to be
using a pre-existing C library. This suggests searching for an
opensource ZIP implementation in C may be the more productive route.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,082
Messages
2,570,589
Members
47,212
Latest member
JaydenBail

Latest Threads

Top