9

I've seen some posts on finding a class via searching jars in a directory and it caused me to think there must be a tool in IntelliJ IDEA to do this. Anyone aware of such a tool and how to use it?

Zack Macomber
  • 6,392
  • 13
  • 55
  • 98
  • intellj can automatically decompile jar files, so you can search over the all .class files. – erhanasikoglu Oct 16 '15 at 14:51
  • Technically since a jar file is just a zip file you can find out what classes are in a jar just buy in effect doing a "zip -v zipfile" to show the .classes contained in the zip. IntelliJ also has the ability to decompile .class files so for instance you can 'goto definition' of a class and IntelliJ will show you the decompiled code. In the past (I believe) IntelliJ did the decompilation with a JAD plugin but currently uses a decompiler called fernflower. – JJF Oct 19 '15 at 19:04

2 Answers2

16

If the jar files are imported as project dependencies you can type cmd + n then search it.

enter image description here

Fatih Donmez
  • 4,221
  • 2
  • 31
  • 45
0

The new key mappings for IntelliJ use double ⇧ (shift). Tap shift twice to get to the search everywhere window then tab once to classes.

https://www.jetbrains.com/help/idea/searching-everywhere.html

jyapx
  • 1,449
  • 1
  • 12
  • 18