This following code demonstrates how to use this project as a baseline for developing Nuix applications with the Java SDK.
- Java SDK 11
- Nuix license
- Nuix engine
.
|-- app # Java application code.
|-- build # Gradle build directory.
|-- engine # Unzip the engine you want to use to this directory.
|-- src
|-- main
|-- java # Application source.
|-- resources # Application resources.
|-- test
|-- java # Test source.
|-- resources # Test resources.
|-- build.gradle # The gradle build file.
|-- gradle
|-- logs # The log directory.
|-- gradle.properties # The gradle properties file.
|-- gradlew # The gradle executable.
|-- settings.gradle # Gradle settings file.
|-- README.md # This README file.
-
Download the Nuix engine from https://download.nuix.com/releases/engine/
-
Unzip the engine to the app/engine directory. If the directory does not exist create the engine directory.
-
Copy
gradle.properties.example
togradle.properties
and update the file with the appropriate license server, username, password, and license source.nuix.license.server.username=YOUR_LICENSE_SERVER_USERNAME nuix.license.server.password=YOUR_LICENSE_SERVER_PASSWORD nuix.license.shortname=LICENSE_SHORTNAME nuix.registry.servers=LICENSE_SERVER_URL nuix.license.source=LICENSE_SOURCE workerCount=2
Valid license sources include:
['server', 'local-relay-server-local-users', 'local-relay-server-cls-users', 'cloud-server']
To build the project execute the following command from a command prompt. By default the application will acquire a license as part of the unit tests.
./gradlew clean build
To run the application execute the following command from a command prompt.
./gradlew run
By default the build.gradle
file will execute mainClass = 'com.nuix.examples.LicenseAcquisition'
when running
the application. To switch and execute a different main method you can override the mainClassName
parameter.
./gradlew -PmainClassName=com.nuix.examples.EngineVersion run
You can pass arguments to an application main method using -P
or -D
flags.
./gradlew -PmainClassName=com.nuix.examples.CreateCase -DcasePath=PATH/TO/CASE run
Once a case has been created, you can run the file processing example.
./gradlew -PmainClassName=com.nuix.examples.DefaultFileProcessing -DcasePath=PATH/TO/CASE -DrawData=PATH/TO/DATA run
You can use the CaseItemCount example to verify the ingested data.
./gradlew -PmainClassName=com.nuix.examples.CaseItemCount -DcasePath=PATH/TO/CASE run