Jar File Search!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Jar File Search!
# 1  
Old 09-15-2005
Jar File Search!

Hi vgersh99,
Iam sorry for that. In future, I will start new threads for different topics. Assuming that we don't know what the name of the jar file, we are searching for is, do we have any way, of finding a string or a file in it. Is there any Unix command for it?

thanks.
# 2  
Old 09-15-2005
Jar File Search!

Hi vgersh99,
Assuming that we don't know what the name of the jar file, we are searching for is, do we have any way, of finding a string or a file in it. Is there any Unix command for it?

thanks.
# 3  
Old 09-15-2005
What kind of string are you looking for in a jar file. Are you looking for a class name?

As you find jar files your can use "jar -tvf" to determine its contents.

You then could try someting like this:
Code:
find . -name \*jar -print -exec jar -tvf {} \; | nawk '/YOURSEARCHSTRING/ || /jar/ {print} '


Last edited by tmarikle; 09-15-2005 at 02:59 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Getting the version from jar file

Hi, I am trying to retrieve the "Implementation version" from one of the .jar file The command which tried is as below. find /usr/local/platform -name "platform.jar" -exec zipgrep "Implementation-Version:" '{}' \;|awk -F ': ' '{print $2}'I am able to get the version as below 2.9.0-29But... (2 Replies)
Discussion started by: nextStep
2 Replies

2. Programming

Altering a jar file

I have a script I am trying to test and run but it runs against a jar file. I wrote an external property file so it would redirect with my script, but it keeps going in search of the previous property file. Is there any way to externally over write the jar file and if not how do you go about... (7 Replies)
Discussion started by: risarose87
7 Replies

3. Shell Programming and Scripting

Want to write all the jar name in single with delimiter ":" in beween the jar name

Hi All, I am having 7 jar files in a dir. abc like listed below bash-3.00$ cd abc bash-3.00$ ls 123.jar 23wdawd.jar dfsa23.jar dsa.jar wew234.jar adsd234234.jar dfsda423.jarNow i want to assign all this jar files to a variable in the below format ... (6 Replies)
Discussion started by: natraj005
6 Replies

4. UNIX for Advanced & Expert Users

File count limit in jar ?

Hello everyone, I am using jar to consolidate a large number of files for transfer, about 2500. The jar command seems to work fine and it says ....adding.... files while it is building the archive. If I capture the messages to a log the log has 2500 lines each of them says I file was addedd... (2 Replies)
Discussion started by: gio001
2 Replies

5. Shell Programming and Scripting

calling jar file from ksh

Hi, I have a below command in ksh .... $JAVA_HOME/bin/java -cp "/usr/orabase/product/10.2.0/lib:/usr/java/javajar/common/sched.jar:/usr/orabase/product/10.2.0/jdbc/lib/ojdbc14_g.jar:/usr/orabase/product/10.2.0/jdbc/lib/classes12.jar" com.abrt.smart.Smart I want to know where the... (1 Reply)
Discussion started by: PRKS
1 Replies

6. UNIX for Dummies Questions & Answers

How to create a service from a jar file.

Hi, I am new to Linux. I have a executable jar file which I need to run even before the user logs in. The problem is since I don't have good information about the services in Linux its very difficult to understand the same topic posted at other forums. I have tried many things like java... (0 Replies)
Discussion started by: ankushpandit
0 Replies

7. UNIX for Dummies Questions & Answers

down in JAR file

Hello sir, I have created a jar file having some code in java.What it does is that it calls a shell code (a.sh) which is in the same directory. Now my requirement is that I want to jar the a.sh also along with the other files and want to call the a.sh which is now inside the jar file and not... (1 Reply)
Discussion started by: nsharath
1 Replies

8. Shell Programming and Scripting

Search inside a Jar file..

Hey Guys, I need to search inside all the jar files of my directory for a specific string. Can anyone guide me as to how i can do it. I need this urgently please. More specifically i need to search for a class file name in the jar files. Thanks in advance :-) (4 Replies)
Discussion started by: srikumar_cs
4 Replies

9. UNIX for Dummies Questions & Answers

find string in .jar file

Hello, I have a .jar file and am trying to figure out if it is possible to search for some text in all the files in it without extracting it. I was able to do it using jar xf <filename>.jar and then using grep but want a one liner. Thanks in advance:) (8 Replies)
Discussion started by: rakeshou
8 Replies
Login or Register to Ask a Question