| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| <head> |
| <meta name="copyright" content= |
| "Copyright (c) IBM Corporation and others 2012. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." /> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| <meta http-equiv="Content-Style-Type" content="text/css" /> |
| <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css" /> |
| <title>Setting the Java build path</title> |
| <link rel="stylesheet" type="text/css" href="../book.css" /> |
| </head> |
| <body> |
| <h2>Indexes for the Java search</h2> |
| <p>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. |
| </p> |
| <h3> Generating the index </h3> |
| <p> An index can be pre-generated in the following ways:</p> |
| <ul> |
| <li> An API <b><a href= |
| "../reference/api/org/eclipse/jdt/core/index/JavaIndexer.html#generateIndexForJar(String,%20String)"> |
| JavaIndexer#generateIndexForJar</a></b>. |
| </li> |
| <li> A command line application <b><a href= |
| "../reference/api/org/eclipse/jdt/core/index/JavaIndexerApplication.html"> |
| JavaIndexer</a></b> |
| </li> |
| <li> An Ant task <b><a href= "../reference/api/org/eclipse/jdt/core/BuildJarIndex.html"> |
| eclipse.buildJarIndex</a></b> |
| </li> |
| </ul> |
| |
| <h3> Specifying the index </h3> |
| <p> The index can be specified as a <b><a href="../reference/api/org/eclipse/jdt/core/IClasspathAttribute.html#INDEX_LOCATION_ATTRIBUTE_NAME">classpath attribute</a></b> |
| 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. |
| </p> |
| </body> |
| </html> |