[Kaffe] does anyone care about this jar feature?

Moses DeJong dejong at cs.umn.edu
Wed Feb 10 19:21:37 PST 1999


On Thu, 11 Feb 1999, Alex Nicolaou wrote:

> Moses DeJong wrote:
> > To be perfectly honest, I do not think this is a feature that
> > anyone should be using and I would rather not add it to my
> > implementation because it causes a number of other "problems".
> > Does anyone think that this feature is worth adding? If you
> > can think of some good reason why this might be a good feature
> > to have please post it to the list so I know where you stand.
> > Please, no "that is how Sun does it" posts.
> 
> But *that is how Sun does it* ;-) (Kidding! Kidding! Sheesh.)

Well, that is about the same as doing jar -xvf SOMEPATH/activation.jar.
I guess that could be a valid reason to use the stdin stuff.
 
> This feature is usually used to copy directory trees with tar; jar is
> clearly meant to operate the same way tar does. Is this useful? I don't
> really know...typical usage that I have for this feature are to extract
> jars to a different directory:
> 
> # this command will stick an unpacked version of activation.jar in
> /tmp/activ
> cat activation.jar | (cd /tmp/activ; jar xv)
> 
> Using rsh, you could also be unjarring the file to a different machine,
> but I've never bothered with that. Normally I want to look at some
> .class file temporarily, so I just unpack somewhere where I can later
> destroy the unpacked object files.
> 
> With tar, you'd often do something like:
> 
> # you wish this would preserve symlinks
> jar cv * | (cd ../ac; jar xv)
> 
> to recursive copy a directory and its symlinks. However jar does not
> preserve symlinks, and it also introduces extra files, so this form is
> not very useful.
>
> Other than the use of unpacking to a different directory (which is very
> convenient if you're used to doing it that way) I don't have a use for
> the feature.

It is not a "problem" in the sense that it can not be done, I just think
it is a little ugly and I really doubt that people are really using this
feature. I did not even know it existed until I started REALLY looking
at the tool docs. It could also get a little ugly when you combine it
with the new -C (change dir while processing the jar command) option.
I am not sure Sun really thought through some of these JDK1.2 jar
changes.

mo dejong
dejong at cs.umn.edu

> The real question that comes to mind is why is it a problem to handle
> writing to standard in/out?
> 
> alex
> 



More information about the kaffe mailing list