Mailing List Archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] AdBookWorkaround

Jean-Christian Imbeault wrote:

> How did you extract the file from the jar to edit it in the first place?
> To make a jar file you just need to use the, wait for it ..., jar 
> command. jar --help is a good start. But then again this is assuming 
> that simply extracting the file from the jar, editing it, and 
> repackaging the jar is a viable solution for your specific problem.
> I don't know for a fact that it is (or is not). But give it a quick 
> try and it just might work.

I just went there with Konquoror and opened the file with a text editor 
(SciTE), changed the line and saved the file.

jar --help

Thanks!  That brings up:

Usage: jar {ctxuV}[vfm0ME@] [jar-file] [manifest-file] [-C dir] files ...

Store many files together in a single `jar' file.

  -c              create new archive
  -t              list table of contents for archive
  -x              extract named (or all) files from archive
  -u              update existing archive

  -@              read names from stdin
  -0              store only; use no ZIP compression
  -C DIR FILE     change to the specified directory and include
                  the following file
  -E              don't include the files found in a directory
  -f FILE         specify archive file name
  --help          print this help, then exit
  -m FILE         include manifest information from specified manifest file
  -M              Do not create a manifest file for the entries
  -v              generate verbose output on standard output
  -V, --version   display version information

If any file is a directory then it is processed recursively.
The manifest file name and the archive file name needs to be specified
in the same order the 'm' and 'f' flags are specified.

Example 1: to archive two class files into an archive called classes.jar:
     jar cvf classes.jar Foo.class Bar.class
Example 2: use an existing manifest file 'mymanifest' and archive all the
     files in the foo/ directory into 'classes.jar':
     jar cvfm classes.jar mymanifest -C foo/ .

I'll try playing around with that and see what happens.

Thanks again!


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links