Any java lib. to parse .cab file?

  • Thread starter mail_pushkarajthorat_at_gmail
  • Start date
M

mail_pushkarajthorat_at_gmail

Greetings,

I need a java lib. to parse the cab file, I've searched java 1.5 APIs,
it seems that it contain classes to handle only gzip and jar format.
Google didnot located any such pages, can anyone please point me the
lib. which can be helpful.

Thanks in advance
Pushkaraj
 
A

Arne Vajhøj

I need a java lib. to parse the cab file, I've searched java 1.5 APIs,
it seems that it contain classes to handle only gzip and jar format.
Google didnot located any such pages, can anyone please point me the
lib. which can be helpful.

I don't think there is anything in Java to read such a MS specific
format.

Runtime exec and the EXPAND command seems to be you best choice.

Arne
 
M

mail_pushkarajthorat_at_gmail

Runtime exec and the EXPAND command seems to be you best choice.

Arne Thanks for your reply, but, I need platform independent
implementation. The code is going to run on any *NIX or Windows..
Is there any other way out in this sceanerio?

Thanks,
Pushkaraj
 
A

Andreas Leitgeb

Arne Thanks for your reply, but, I need platform independent
implementation. The code is going to run on any *NIX or Windows..
Is there any other way out in this sceanerio?

There exists an (open-source) cabinet-extractor "cabextract"
in most linux-distributions. (maybe GPL'ed)
As a last resort, you may need to port that from (probably) C to Java.

I'm not a lawyer, but if you use the (possibly) GPL'ed C-source just to
understand the decompression algorithm, and then re-implement it in
Java, then I think you're not even bound to GPL for your Java version.
But then again, perhaps GPL is just fine, anyway...

If still interested, you'll surely find the source by googling for cabextract.
 
M

mail_pushkarajthorat_at_gmail

There exists an (open-source) cabinet-extractor "cabextract"
in most linux-distributions. (maybe GPL'ed)
As a last resort, you may need to port that from (probably) C to Java.

Yeah, that may be an option. But porting 'cabextract' in java will
require some time, anyway Thanks for your response. I will look if
porting is easily doable.
 
L

Lew

Andreas said:
I'm not a lawyer, but if you use the (possibly) GPL'ed C-source just to
understand the decompression algorithm, and then re-implement it in
Java, then I think you're not even bound to GPL for your Java version.

If you use the licensed source as the foundation for your own source,
whatever the language, then you are not doing a clean-room
implementation. It is pretty clear that in that case the derived
program is a "Derived Work" as the GPL defines it, and were the
antecedent program covered by the GPL, the derived work would be as
well.

Were it I, I would not want to pay the legal fees to defend against an
infringement claim even were I to prevail. In such a situation,
porting GPLed code from C to Java, I would adhere to the GPL terms.
Quite aside from that, using GPL source to "inspire" a port to another
environment, then not GPLing the result, violates the purpose and
spirit of the GPL. If you benefit from the free (as in speech)
technology and the thoughtful effort of the original licensor, then
you have a moral if not a legal obligation to honor that license.
Advocating that a person violate that via sneaky legal shenanigans is
reprehensible. Doing such a thing is more so.

If you use GPL code and modify it for your own purposes, you are a
thief if you try to work around GPLing the result, and someone helping
you to do so is an accessory to theft, no matter what the courts may
say.
 
A

Andreas Leitgeb

If you use the licensed source as the foundation for your own source,
whatever the language, then you are not doing a clean-room
implementation.

With "use the C-source just to understand the decompression algorithm",
I was intending to point towards certain cleanroom-like conditions.

Understanding an algorithm, and then re-implementing it from brain
is *not* a derivative work in my current understanding of GPL.
GPL'd software isn't the same as software-patented software.

If you're of different opinion, quoting explicit and relevant parts of
the GPL is more likely to convince me, than this previous posting.
 
A

Arne Vajhøj

Arne Thanks for your reply, but, I need platform independent
implementation. The code is going to run on any *NIX or Windows..
Is there any other way out in this sceanerio?

What will you do with a cab file on Unix anyway?

Arne
 
A

Arne Vajhøj

Andreas said:
With "use the C-source just to understand the decompression algorithm",
I was intending to point towards certain cleanroom-like conditions.

Understanding an algorithm, and then re-implementing it from brain
is *not* a derivative work in my current understanding of GPL.
GPL'd software isn't the same as software-patented software.

If you're of different opinion, quoting explicit and relevant parts of
the GPL is more likely to convince me, than this previous posting.

Traditionally clean room implementation very explicitly requires
the programmers never to have seen the source code being reimplemented.

That is a good indication that big companies are not willing to take
the risk of such work being considered copyright infringement.

http://en.wikipedia.org/wiki/Clean_room_design explains a little bit
about it.

Arne
 
A

Arne Vajhøj

Arne said:
Traditionally clean room implementation very explicitly requires
the programmers never to have seen the source code being reimplemented.

That is a good indication that big companies are not willing to take
the risk of such work being considered copyright infringement.

http://en.wikipedia.org/wiki/Clean_room_design explains a little bit
about it.

SUN seems to believe that it is a problem since they in JRL:
http://www.java.net/jrl.csp
put a paragraph 18:

<quote>
The JRL is not a tainting license and includes an express Òresidual
knowledgeÓ clause which says you're not contaminated by things you
happen to remember after examining the licensed technology. The JRL
allows you to use the source code for the purpose of JRL-related
activities but does not prohibit you from working on an independent
implementation of the technology afterwards. Obviously, if your
intention is to create an ÒindependentÓ implementation of the technology
then it is inappropriate to actively study JRL source while working on
such an implementation. It is appropriate, however, to allow some decent
interval of time (e.g. two weeks) to elapse between working on a project
that involves looking at some JRL source code and working on a project
that involves creating an independent implementation of the same technology.
</quote>

(two weeks quarantine is practically nothing)

Arne
 
M

Mike Schilling

Arne said:
SUN seems to believe that it is a problem since they in JRL:
http://www.java.net/jrl.csp
put a paragraph 18:

<quote>
The JRL is not a tainting license and includes an express Òresidual
knowledgeÓ clause which says you're not contaminated by things you
happen to remember after examining the licensed technology. The JRL
allows you to use the source code for the purpose of JRL-related
activities but does not prohibit you from working on an independent
implementation of the technology afterwards. Obviously, if your
intention is to create an ÒindependentÓ implementation of the
technology then it is inappropriate to actively study JRL source
while working on such an implementation. It is appropriate, however, to
allow some
decent interval of time (e.g. two weeks) to elapse between working on
a project that involves looking at some JRL source code and working
on a project that involves creating an independent implementation of the
same
technology. </quote>

(two weeks quarantine is practically nothing)

Apache and BSD licenses don't taint (i.e. are not punitive towards
commercial software) either.
 
A

Arne Vajhøj

Mike said:
Apache and BSD licenses don't taint (i.e. are not punitive towards
commercial software) either.

They don't taint in the GPL sense.

But this is about a different type of tainting (if you have
ever seen a piece of code are you then forever prevented
from implementing the same functionality).

Arne
 
L

Lew

They don't taint in the GPL sense.

Apache and BSD licenses are founded in a radically different point of view and
intent than GPL. The whole point of GPL is to prevent anyone from closing off
(making proprietary) the GPLed code, or from being able to profit on it
without freely contributing the derivations back to the GPLed product. That's
why derived works from GPL source must themselves be GPLed.

I won't recapitulate the whole FSF argument for GPL or why it's so restrictive
against commercialization (as some may see it). I'm only pointing out that
there's a spirit and a philosophy behind GPL, and doing non-clean-room
implementations of GPLed code without GPLing the result is a total violation
of that spirit and philosophy.

But, hey, if you're the kind of person who would exploit an idealist's hard
work and innovation that way in order to save yourself the trouble of
independently doing that work yourself, and you don't mind risking the legal
fees and hassle to defend against a copyright-infringement suit, and you can
face yourself in the mirror in the morning for doing all that, well, I sure
can't stop you from your ruthless actions, though I might cheer the FSF and
the copyright holder for instituting the aforementioned lawsuit.

For the record, the "you" in the above is rhetorical. If the shoe doesn't
fit, don't wear it. I certainly am not referring to Mike Schilling nor Arne
Vajhøj.

But seriously, why not GPL the derived work? What harm? You'd support the
idealism of the author whose work you're leveraging, you'd have that lovely
product with the benefit of the work you copied, you'd do others with a
similar need a lot of good, and you can always monetize the result one way or
another without violation of the GPL. And you won't have to put yourself in
the position of arguing for what's at best a morally ambivalent stance; you
know that GPLing an adaptation of GPLed code is kosher.
 
M

Mike Schilling

Lew said:
But seriously, why not GPL the derived work? What harm?

For one thing, you would never do any business with many large
companies, the sort ISVs can't afford to write off. Not very
idealistic, I know, but it's a fact. So at times I've had to
re-implement stuff I couldn't find an Apache or BSD-licensed version
of, rather than use or adapt the perfectly good GPL'd version, all
because Richard Stallman thinks that what I do for a living is
immoral.
 
L

Lew

Mike said:
For one thing, you would never do any business with many large
companies, the sort ISVs can't afford to write off. Not very
idealistic, I know, but it's a fact. So at times I've had to
re-implement stuff I couldn't find an Apache or BSD-licensed version
of, rather than use or adapt the perfectly good GPL'd version, all
because Richard Stallman thinks that what I do for a living is
immoral.

More precisely, because the author who went through all that trouble and GPLed
their code felt that their work should remain free. I'm fairly certain they
weren't thinking of you personally.

Don't blame the author who GPLs their work; blame your large corporate client
who refuses to accept it. Or blame them for refusing to pay large license
fees for proprietary software, if that's their choice, not the author who
charges such fees.

I don't know why you sound so bitter. If there hadn't been a GPLed work,
you'd've had to write something yourself anyway. If there had been a
proprietary-licensed work, you'd've had to pay the copyright holder to use it,
perhaps lots of money. If you didn't choose to pay, you'd've had to write
something yourself anyway.

The author gets to choose how to prevent you from selling their copyrighted
hard work without compensation to them; either you pay them cash or give them
the warm fuzzy for making it free, their choice. It's rather mean-spirited to
blame either the GPL-using author or the one who charges lots of cash. It's
their effort and they get to choose the license. Boo-hoo for you.

Also you described a different scenario than I did. I spoke of GPLing a work
derived from a GPLed work. You chose not to GPL a work not derived from a
GPLed work. Apples and oranges.
 
M

Mike Schilling

Lew said:
More precisely, because the author who went through all that trouble
and GPLed their code felt that their work should remain free. I'm
fairly certain they weren't thinking of you personally.

Stallman came up with the idiotic "It's immoral to charge money for
software you put time and effort into cretaing." Without him, I doubt
that many people who want to contribute their software to the world
would bother to distinguish between commercial and non-commercial uses
of it. I wouldn't.
 
M

Mike Schilling

I said:
No he didn't. Stallman in no way objects to people charging money
for
software. Indeed, the FSF used to (and, for all I know, still does)
charge money for its software.

But since he wants everyone I sell software to to be able to
redistribute it freely, he doesn't want me to be able to sell it for
enough to make a living.
The GPL doesn't make a distinction between commercial and
non-commercial uses of software. Any license that did would not be a
free software license, because it wouldn't protect what the FSF call
"freedom 0," the freedom to run the program for any purpose.

See above: Stallman wants everyone who contributes software to prevent
people from using it to make a living. See
http://www.gnu.org/licenses/why-not-lgpl.html : don't use LGPL because
it's insufficiently punitive.
 
M

mail_pushkarajthorat_at_gmail

What will you do with a cab file on Unix anyway?

Arne

My code downloads wsusscncab2.cab file (http://go.microsoft.com/
fwlink/?LinkID=74689) and extracts it. Currently I am identifying the
OS and either using "cabextract" on *NIX OR "EXPAND" on Windows and
now we are removing the dependency on 'cabextract'(as user has
explicitely install it). To unifiy the approach I feel to use some
java lib. to extract and which works on any OS.
 
A

Andrew Thompson

...
My code downloads wsusscncab2.cab file (http://go.microsoft.com/
fwlink/?LinkID=74689) and extracts it. ...

Why? I cannot speak for anyone else, but that
answer did not communicate to me, the ultimate
point or purpose of doing this.

Can you express it as something that might be
listed as a program feature (one that might
inspire a person glancing at the 'shrink
wrapped packaging' to buy the software)?
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top