## Indexes for the Java search

The JDT search creates indexes for all the sources and the dependent JARs. As a JAR gets added onto the classpath, it is indexed. This operation could take some time depending upon the size of the JAR. To improve the performance, one can pre-build the index and specify the index file for a JAR when it gets added onto the classpath. This is only supported for JARs.

### Generating the index

An index can be pre-generated in the following ways:

- An API JavaIndexer#generateIndexForJar.
- A command line application JavaIndexer
- An Ant task eclipse.buildJarIndex

### Specifying the index

The index can be specified as a classpath attribute of the library that is getting added. The index file has to be in a valid URL form. If the index file is not found, JDT generates an index file and uses it for searches.