LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-04-2007, 01:33 PM   #1
niks27
LQ Newbie
 
Registered: Jun 2007
Posts: 6

Rep: Reputation: 0
Question Modify the contents of a jar file.


Hello Everyone,

I want to modify the date/time stamp of all the JSP files in my jar.

Appreciate the inputs.

Thanks & Best Regards
Niks...
 
Old 09-04-2007, 02:32 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
My understanding is that a jar-file is a simple zip ...
all you need to do is to unzip it, touch the content,
and zip it up again. Something like:
Code:
mkdir tmp_jar
cd tmp_jar
unzip path/to/your.jar
find . -exec touch -t[[CC]YY]MMDDhhmm[.ss]  {} \;
zip your.jar *

Cheers,
Tink

Last edited by Tinkster; 09-05-2007 at 01:53 PM. Reason: edited closing code tag
 
Old 09-05-2007, 11:09 AM   #3
niks27
LQ Newbie
 
Registered: Jun 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks Tink. I already did that yesterday, but I was trying to use grepjar and touch so that it can be done in the single line. But unable to achieve any results.

Thanks for your input though.
 
  


Reply


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
Modify Contents of Hardrives suyash Linux - Networking 1 11-07-2005 01:05 PM
how to edit a *.jar file? ploosh Linux - Newbie 4 02-28-2005 03:58 PM
Fedora Core 1 Associating .jar files with java -jar command pymehta Fedora 0 01-13-2005 06:26 AM
Help installing a (.jar) file. troycus Linux - Newbie 6 10-08-2003 08:23 PM
modify file access & modify timestamps i2itstud Linux - General 1 05-20-2003 04:34 AM


All times are GMT -5. The time now is 09:43 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration