LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-26-2006, 05:34 PM   #1
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
adding multiple files to jar archive


Hello,

I seem to be having difficulties adding more then one file to a jar archive using the command line utility.

the man page says this at the end of the parameter descriptions:

Quote:
All remaining options are considered to be names of files.
So I figured I would be able to just list the different files I want to add. I've tried a couple different ways that I know of to do this, but they all result in either an error, or only adding the first file.

Code:
jar -cvf "$TMPDIR/chrome/ff_kiox.jar" -C "$PWD/chrome/" ./content ./skin
but I get :
Code:
adding: META-INF/ (in=0) (out=0) (stored 0%)
adding: META-INF/MANIFEST.MF (in=56) (out=56) (stored 0%)
adding: content/ (in=0) (out=0) (stored 0%)
<snip>...
skin: No such file or directory
Error adding ./skin to jar archive!
and the jar archive only contains the first listed directory (if I switch the order, skin will be in there, but content will error out).

I also tried:
Code:
jar -cvf "$TMPDIR/chrome/ff_kiox.jar" -C "$PWD/chrome/" ./{content,skin}
Same thing.

Any suggestions?

Thanks for the help!
...drkstr
 
Old 12-26-2006, 06:09 PM   #2
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
i think if you are going to use -C you have to use it for each argument because its effects are temporary
like
Code:
jar -cvf "$TMPDIR/chrome/ff_kiox.jar" -C "$PWD/chrome/" ./content -C "$PWD/chrome/" ./skin
 
Old 12-26-2006, 07:54 PM   #3
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
ah, yes. Good catch studioj!

Thanks for the help!
...drkstr
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with winrar - adding multiple files into separate archives some_random_dude Linux - Software 4 02-04-2007 11:05 AM
Adding Multiple Files In A Single Gz File onacorpuscle Linux - Newbie 3 08-31-2006 03:18 AM
is there a linux-supported archive format that can split into multiple files? Moebius Linux - Software 3 07-11-2006 02:52 PM
divide a directory into multiple archive files with par ddaas Linux - General 1 02-26-2005 01:52 PM
Fedora Core 1 Associating .jar files with java -jar command pymehta Fedora 0 01-13-2005 05:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration