LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-19-2014, 04:41 AM   #1
rahggupt
LQ Newbie
 
Registered: Jun 2014
Posts: 1

Rep: Reputation: Disabled
creating jar with specified structure


I have a files structure as "/tmp/jar/org/application/classes/"

I want to create a jar which includes the files from org.

"jar cvf newjar.jar /tmp/jar/org" creates a jar with /tmp/jar included. Is there a way to create jar with specified file structure.
 
Old 06-20-2014, 01:47 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
How about:

Code:
cd /tmp/jar
jar cvf /tmp/newjar.jar org
or use the -C option to jar.

Last edited by smallpond; 06-20-2014 at 01:59 PM.
 
  


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
Avoiding DVDAuthor error when creating DVD structure. LordXzi Linux - Software 0 11-21-2011 09:34 AM
[SOLVED] Creating a directory structure. Tayuechick Linux - Newbie 5 05-16-2010 08:33 AM
Problem in Creating jar file of a java project BlueSkull Programming 3 12-20-2009 10:47 AM
creating jar file sajith Programming 2 05-16-2008 11:57 PM
creating jar files linux_ub Programming 12 08-12-2004 04:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:36 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