Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-19-2014, 05:41 AM   #1
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, 02:47 PM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,247

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
How about:

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

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

All times are GMT -5. The time now is 10:35 AM.

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