private void start(File stdlib, File fileOrDir) throws Exception {
rootDir = fileOrDir.isFile() ? fileOrDir.getParentFile() : fileOrDir;
rootPath = rootDir.getCanonicalPath();
indexer = new Indexer();
indexer.addPath(stdlib.getCanonicalPath());
info("building index...");
indexer.loadFileRecursive(fileOrDir.getCanonicalPath());
indexer.ready();