This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes renaming file in the ear Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "renaming file in the ear" Watch "renaming file in the ear" New topic

renaming file in the ear

kamesh aru
Ranch Hand

Joined: Mar 16, 2002
Posts: 150
is there a way to rename a file with in ear with jar command?
ex:-xyz.ear file got a file temp.txt i need to rename the temp.txt to original.txt

thanks in advance
Abdulla Mamuwala
Ranch Hand

Joined: Jan 09, 2004
Posts: 225
May be you will need to extract the contents of the ear file. Then rename your file to original.txt and zip it up as an ear. Probably you will have to use the jar utilities to extract your files from the ear and later use your build scripts to create your ear. Not sure what a text file is doing in an ear. An ear is supposed to contain WAR files and JAR files, and is deployed in an application server. Don't really understand your question.
kamesh aru
Ranch Hand

Joined: Mar 16, 2002
Posts: 150
the text file is used for tracking of the builds info.using jar utilites any way of renaming the file with out extracting ?
thanks for your responce
I agree. Here's the link:
subject: renaming file in the ear