public void generateIndexForJar(String pathToJar, String pathToIndexFile) throws IOException {
File f = new File(pathToJar);
if (!f.exists()) {
throw new FileNotFoundException(pathToJar + " not found"); //$NON-NLS-1$
}
IndexLocation indexLocation = new FileIndexLocation(new File(pathToIndexFile));
Index index = new Index(indexLocation, pathToJar, false /*reuse index file*/);
SearchParticipant participant = SearchEngine.getDefaultSearchParticipant();
index.separator = JAR_SEPARATOR;
ZipFile zip = new ZipFile(pathToJar);
try {