Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

how do i open a zip file on the C drive using jar

Thread view: 
ros - 11 May 2007 04:31 GMT
Hello,

I have a zipped folder in the C drive and I tried to open it using a
jar command but it gave me an error which I have pasted below.

Can anybody please tell me how I can open it using jar? I know I can
use WinZip like utility but am curious how to use jar.

Thanks in advance.
Ros

C:\>jar -xvf ant_template_core_java.zip
Illegal option: û
Usage: jar {ctxu}[vfm0M] [jar-file] [manifest-file] [-C dir] files ...
Options:
   -c  create new archive
   -t  list table of contents for archive
   -x  extract named (or all) files from archive
   -u  update existing archive
   -v  generate verbose output on standard output
   -f  specify archive file name
   -m  include manifest information from specified manifest file
   -0  store only; use no ZIP compression
   -M  do not create a manifest file for the entries
   -i  generate index information for the specified jar files
   -C  change to the specified directory and include the following
file
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/ .
Brandon McCombs - 11 May 2007 04:54 GMT
> Hello,
>
[quoted text clipped - 9 lines]
> C:\>jar -xvf ant_template_core_java.zip
> Illegal option: û

So where exactly did you type that illegal character? I ask because it
isn't in the command that you typed above it.

> Usage: jar {ctxu}[vfm0M] [jar-file] [manifest-file] [-C dir] files ...
> Options:
[quoted text clipped - 21 lines]
>            files in the foo/ directory into 'classes.jar':
>        jar cvfm classes.jar mymanifest -C foo/ .
ros - 11 May 2007 06:42 GMT
> > Hello,
>
[quoted text clipped - 38 lines]
> >            files in the foo/ directory into 'classes.jar':
> >        jar cvfm classes.jar mymanifest -C foo/ .

Actually I simply copy-pasted this command from a tutorial that I am
doing. Your remark got me thinking and I wrote this command in the
prompt and it worked.

I don't really understand where that illegal character came from as
everytime I copy-paste it from the tutorial I get this.

Thanks for the reply though.
Really appreciated.
Ros
Lew - 11 May 2007 13:16 GMT
>>> Hello,
>>> I have a zipped folder in the C drive and I tried to open it using a
[quoted text clipped - 3 lines]
>>> C:\>jar -xvf ant_template_core_java.zip
>>> Illegal option: û

Brandon McCombs <n...@none.com> wrote:
>> So where exactly did you type that illegal character? I ask because it
>> isn't in the command that you typed above it.

> Actually I simply copy-pasted this command from a tutorial that I am
> doing. Your remark got me thinking and I wrote this command in the
> prompt and it worked.
>
> I don't really understand where that illegal character came from as
> everytime I copy-paste it from the tutorial I get this.

From what did you copy?  Was it a word-processing program?

Many wp programs use proprietary formats; they are binary files.  They contain
all sorts of characters, like left-quotes and right-quotes, that you might not
notice.  But the compiler sure does if you copy them into a source file.

I have been on more than one projects where people foolishly copied screen
prompts directly from MS Word spec documents and therefore got wrong results
because of this.

Signature

Lew

ros - 12 May 2007 06:55 GMT
> >>> Hello,
> >>> I have a zipped folder in the C drive and I tried to open it using a
[quoted text clipped - 25 lines]
> --
> Lew

That explains it as I also "foolishly" copied this statement off a
webpage and pasted it in the Command Prompt!

Thanks for the explanation.
Ros


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.