473,403 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Interpreting a JAR-file in .NET

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

--
"If it was so, it might be; and if it were so, it would be; but as it isn't,
it ain't. That's logic" -- Lewis Carroll
Nov 22 '05 #1
6 1805
Einar Høst <_e*******@hotmail.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #2

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Einar Høst <_e*******@hotmail.com> wrote:
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 - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Uhm, well, it works. Heh.

Thanks!
Nov 22 '05 #3

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Einar Høst <_e*******@hotmail.com> wrote:
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 - <sk***@pobox.com>
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.
Nov 22 '05 #4
Einar Høst <_e*******@hotmail.com> wrote:
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 - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #5

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Einar Høst <_e*******@hotmail.com> wrote:
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 - <sk***@pobox.com>
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.
Nov 22 '05 #6
Einar Høst wrote:
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/ind...#1085998534250

Cheers,
--
Joerg Jooss
jo*********@gmx.net

Nov 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Robert Sullivan | last post by:
Here is a method that will access the contents of a cached jar if you are running as an applet. You can easily adapt it to return a collection or apply a filter on the filenames to return a...
3
by: Ted Byers | last post by:
This is quite frustrating! In the documents, and in the newsgroups, I see simple instructions like the following: =============================================== ==========Beginning of Ray's...
1
by: Ted Byers | last post by:
I have gotten to the point where attempting to run my application using "java -jar HotSpotImageTest.jar" no longer generates a complaint about not finding function main. It turned out that the...
1
by: Dado | last post by:
I create the jar with my classes, pictures and some txt files. The application is starting just fine if picture folder is out of the jar. If the folder picture is in the jar I don't see the...
0
by: Todd Moyer | last post by:
I was trying to run an example from the Jython Essentials book but kept getting an error saying: java package 'org.jdom.input' has no attribute 'SAXBuilder' Apparently, it couldn't find the...
0
by: Arnold Peters | last post by:
When I inspected my directories I found a lot of different xercesImpl.jar files with different files and names. E.g.: Are they all compatible? How do I find out which version is a certain...
2
by: Nirmal | last post by:
Hi, Where can I get the real version of xerces 2.8.0 jar instead of xercesSamples2.8.0, This one I got it from Xerces-J-bin.2.8.0 downloads in ...
3
by: eagles | last post by:
I have a program that reads and writes tiff files. I have JAI ImageIO installed on my computer and the program works fine. But when I create a jar and try to run it on another computer I can't read...
3
by: stack | last post by:
I create jar files like that: jar -cvmf manifest.txt app1.jar *.class I run them like that: java -jar app1.jar Ok so far. My program is up and running. When I try to run the same jar files with...
6
by: abhishek20 | last post by:
Hi, I have created a executable jar which bascially using some other jar for calling some function. Now if that dependent jar is set in class path then my executbale jar is working fine. But I want...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.