This is a simple javafx project about File explorer with search functionality of Apache Lucene
- JDK11
- JavaFX 11
- Add javafx module path in your project :
--module-path C:\Users\<user>\Downloads\javafx-sdk-11\lib --add-modules=javafx.controls
- Guide
Note:module-path
is the path to your downloaded JavaFX
- Implement Lucene index & search functions
- Enhance UI
- Open file
- Create / Remove / Rename folders
- Apply multithreading or async task for lucene indexing
- When first started, user is prompted to choose where to store index files for lucene to run
- After selected the directory, that directory will be the base path of the application. Lucene starts indexing the base path.
- After Lucene done indexing you can type some content then click the search button
- Results will show file name and file location
- https://stackoverflow.com/questions/16176701/switch-between-panes-in-javafx
- https://www.baeldung.com/lucene-file-search
- https://lucene.apache.org/core/8_5_0/demo/overview-summary.html#overview.description
Open terminal and run the command accordingly (Suppose you are in the project directory)
- Windows:
java --module-path .\library\javafx-sdk-11.0.2_windows\lib --add-modules=javafx.controls,javafx.fxml -Dfile.encoding=windows-1252 -jar .\out\artifacts\java_lucene_project_jar\java_lucene_project.jar
- Linux:
java --module-path ./library/javafx-sdk-11.0.2_linux/lib --add-modules=javafx.controls,javafx.fxml -Dfile.encoding=UTF-8 -jar ./out/artifacts/java_lucene_project_jar/java_lucene_project.jar