How to change the ''apache.lucene.lockdir'' system property

Check default directory for lock files:
System.getProperty("java.io.tmpdir");

Set directory for lock files:
System.setProperty("org.apache.lucene.lockdir", new File("..."));