Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should be able to right-click on the class name in a source file and select one of the sub-items of the <kbd>Declarations</kbd> context menu item - i.e., right click on the class name and select <kbd>Declarations</kbd>/<kbd>Project</kbd>. This will search the project for any declarations of the class and pop up the standard Eclipse search results view. I am assuming that you have the jar as a library in your Eclipse project.</p> <p>If you want to do this on the file system instead, then use a for loop to iterate over the JAR files and use <code>jar tf FILENAME</code> to get the list of class files and pipe that through <code>grep</code> or <code>findstr</code> (depending on your platform). If you are using <code>bash</code>, something like the following would do the trick:</p> <pre><code>bash-3.2$ for f in *.jar do result=$(jar tf $f | grep '/DBObject.class$') [ -n "$result" ] &amp;&amp; echo "$f contains $result" done mongodb-api-2.6.3.jar contains com/mongodb/DBObject.class bash-3.2$ </code></pre> <p>You could concoct something similar in Windows using a <code>FOR</code> loop at a command prompt but I don't recall if <code>FINDSTR</code> sets the result <code>ERRORLEVEL</code> correctly. The following should work not completely sure of the syntax:</p> <pre><code>C:\Directory\Containing\Jars&gt; FOR %I IN (*.jar) DO @( FOR /F %J IN ('jar tf %I') DO ECHO "%J: %I" ) | FINDSTR /R /C:"/DBObject.class$" mongodb-api-2.6.3.jar: com/mongodb/DBObject.class C:\Directory\Containing\Jars&gt; </code></pre> <p><em>If I remember, I'll edit this after I get to a Windows machine.</em></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload