reading .jar files

M

Mark Volkmann

How can I read the entries in a Java .jar file from Ruby?

I tried the standard library Zlib, but that doesn't work ... I think
because .jar files use the zip format instead of the gzip format.

I tried the rubyzip library at http://rubyzip.sourceforge.net/. For
some reason that didn't get to all the entries in the file, only
"META-INF/" and "META-INF/MANIFEST.MF".
 
M

Michael P. Soulier

How can I read the entries in a Java .jar file from Ruby?

I tried the standard library Zlib, but that doesn't work ... I think
because .jar files use the zip format instead of the gzip format.

I tried the rubyzip library at http://rubyzip.sourceforge.net/. For
some reason that didn't get to all the entries in the file, only
"META-INF/" and "META-INF/MANIFEST.MF".

Perhaps you should simply call the jar program, or unzip, instead of
trying to read the file directly.

Mike
 
T

Thomas Sondergaard

Mark said:
How can I read the entries in a Java .jar file from Ruby?

I tried the standard library Zlib, but that doesn't work ... I think
because .jar files use the zip format instead of the gzip format.

I tried the rubyzip library at http://rubyzip.sourceforge.net/. For some
reason that didn't get to all the entries in the file, only "META-INF/"
and "META-INF/MANIFEST.MF".

rubyzip should be able to read the jar file. Can you send me a .jar file
that is causing you problems.

Best regards,

Thomas Sondergaard
 

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
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top