Everything4J is a implementation of everything which is base on Everything.dll
, and powered by JNA ( Java Native Access ).
Everything
is dependency on Windows file system , so Everything4J also support on Windows system .
Official document reference at https://www.voidtools.com/support/everything/sdk/.
- JNA
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>${jna.version}</version>
</dependency>
- junit
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
- compile as jar
mvn clean install -Dmaven.test.skip=true
-
import target jar into project.
-
put dynamic link library (Everything32.dll , Everything64.dll) into the root of your project.
-
search full file path according to search key string.
private static Everything4j everything4jInstance = Everything4j.getInstance();
List<String> sl = everything4jInstance.searchResult("abc");
System.out.println(sl.size());
for (int i = 0; i < sl.size(); i++) {
System.out.println(i + " ==> " + sl.get(i));
}
}
Apache 2