473,382 Members | 1,386 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,382 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 1804
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.