is there a way to grep(find) the text in a particular file, which is in *.jar and this *.jar is in *.war?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you doing this programmatically from Java?
.war files are basically .zip files, just like .jar files. You can open .zip files with java.util.ZipFile.
Open your .war as a ZipFile, find your .jar within it, open your .jar as a ZipFile, find your text file within it. Now you can read the text and process it however you want.
Does this answer your question?