Download your favorite Linux distribution at LQ ISO.
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 09-04-2007, 12:33 PM   #1
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
Old 09-04-2007, 01:32 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
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:
mkdir tmp_jar
cd tmp_jar
unzip path/to/your.jar
find . -exec touch -t[[CC]YY]MMDDhhmm[.ss]  {} \;
zip your.jar *


Last edited by Tinkster; 09-05-2007 at 12:53 PM. Reason: edited closing code tag
Old 09-05-2007, 10:09 AM   #3
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.


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

All times are GMT -5. The time now is 03:32 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
Open Source Consulting | Domain Registration