Interpreting a JAR-file in .NET

E

Einar Høst

Hi,

I'm writing a C#.NET app that needs to extract some files that are packaged
as a JAR-file. I'd like to avoid having to install java on the (client)
machine. Therefore, I'm wondering: have any of you done this? How did you do
it? Sadly, SharpLibZip doesn't seem to support the JAR-format. Is there any
other (free) library that can be used?

Thanks,
Einar
 
J

Jon Skeet [C# MVP]

Einar Høst said:
I'm writing a C#.NET app that needs to extract some files that are packaged
as a JAR-file. I'd like to avoid having to install java on the (client)
machine. Therefore, I'm wondering: have any of you done this? How did youdo
it? Sadly, SharpLibZip doesn't seem to support the JAR-format. Is there any
other (free) library that can be used?

What happens when you try to use SharpZipLib? It should work fine with
jar files, as they're just zip files with a manifest.
 
E

Einar Høst

Einar Høst said:
I'm writing a C#.NET app that needs to extract some files that are packaged
as a JAR-file. I'd like to avoid having to install java on the (client)
machine. Therefore, I'm wondering: have any of you done this? How did you do
it? Sadly, SharpLibZip doesn't seem to support the JAR-format. Is there any
other (free) library that can be used?

What happens when you try to use SharpZipLib? It should work fine with
jar files, as they're just zip files with a manifest.

--
Jon Skeet - <[email protected]>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Uhm, well, it works. Heh.

Thanks!
 
E

Einar Høst

Einar Høst said:
I'm writing a C#.NET app that needs to extract some files that are packaged
as a JAR-file. I'd like to avoid having to install java on the (client)
machine. Therefore, I'm wondering: have any of you done this? How did you do
it? Sadly, SharpLibZip doesn't seem to support the JAR-format. Is there any
other (free) library that can be used?

What happens when you try to use SharpZipLib? It should work fine with
jar files, as they're just zip files with a manifest.

--
Jon Skeet - <[email protected]>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Btw Jon, why don't you write a book? Like "The thousand insights of Jon for
C#, .NET and programming in general"? I know I'd buy it! I've think you've
helped me like a dozen times... and there must be dozens and dozens like me.
And a dozen dozens and dozens, well that's a whole bunch of people ;-)

Thanks again.
 
J

Jon Skeet [C# MVP]

Einar Høst said:
Btw Jon, why don't you write a book? Like "The thousand insights of Jon for
C#, .NET and programming in general"? I know I'd buy it! I've think you've
helped me like a dozen times... and there must be dozens and dozens like me.
And a dozen dozens and dozens, well that's a whole bunch of people ;-)

LOL - thanks for the support.

I've considered writing a book, but it would mostly be bits and pieces.
Now I've got a son, the book I'm considering writing (in a few years!)
is "C# for kids" (or whatever language makes sense). When I was a
child, there were *loads* of books geared particularly towards
enthusiastic kids learning BASIC as a hobby. That seems to have gone
away now - but I'm sure the kids haven't...

Anyway, for the moment I'll just keep putting the tips on my website
and in the C# FAQ :)
 
E

Einar Høst

Einar Høst said:
Btw Jon, why don't you write a book? Like "The thousand insights of Jon for
C#, .NET and programming in general"? I know I'd buy it! I've think you've
helped me like a dozen times... and there must be dozens and dozens like me.
And a dozen dozens and dozens, well that's a whole bunch of people ;-)

LOL - thanks for the support.

I've considered writing a book, but it would mostly be bits and pieces.
Now I've got a son, the book I'm considering writing (in a few years!)
is "C# for kids" (or whatever language makes sense). When I was a
child, there were *loads* of books geared particularly towards
enthusiastic kids learning BASIC as a hobby. That seems to have gone
away now - but I'm sure the kids haven't...

Anyway, for the moment I'll just keep putting the tips on my website
and in the C# FAQ :)

--
Jon Skeet - <[email protected]>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


"C# for kids" is a fun idea. Or what about "Ruby for kids"?

Keep the tips coming, on the website, in the C# FAQ and in particular in
this newsgroup. Come to think of it, it's more important to have you right
here helping people on the fly than to have yet another C# book - although
I'm sure it would have been an interesting read.
 
J

Joerg Jooss

Einar said:
Hi,

I'm writing a C#.NET app that needs to extract some files that are
packaged as a JAR-file. I'd like to avoid having to install java on
the (client) machine. Therefore, I'm wondering: have any of you done
this? How did you do it? Sadly, SharpLibZip doesn't seem to support
the JAR-format. Is there any other (free) library that can be used?

Don't forget you can also use J# to expose JDK 1.1 library functionality for
..NET components. See Ted Neward's blog:
http://www.neward.net/ted/weblog/index.jsp?date=20040531#1085998534250

Cheers,
 

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

Top