Comments (2)
Hello @VelpukondaRameshLio
Can you share the main method of your code? My first guess (without seeing that code) would be that the engine release directory is not being referenced or the engine bin
and bin/x86
directories are not on the PATH
environment variable (assuming you are on Windows).
If you are attempting to execute one of the examples in the repository, note that they pass on the Java system property value in nuix.engineDir
when constructing the EngineWrapper instance.
If you do no supply that as an argument (which your example command does not) then I could imagine an issue like this occurring.
I believe you will want to add a few more startup arguments:
-Dnuix.engineDir="<ENGINE_RELEASE_DIRECTORY_HERE>"
-Dnuix.logDir="<LOG_DIRECTORY_HERE>"
-Djava.io.tmpdir="<TEMP_DIRECTORY_HERE>"
You want to make sure that the PATH
environment variable includes the paths to the engine bin
and bin/x86
directories. The Gradle build file automatically accomplishes this for you during tests using these lines:
String envPath = engineBinDirectory + ";" + engineX86BinDirectory
...
...
setEnvironment(["PATH":envPath])
https://github.com/Nuix/Nuix-Java-Engine-Baseline/blob/master/IntelliJ/build.gradle#L45
https://github.com/Nuix/Nuix-Java-Engine-Baseline/blob/master/IntelliJ/build.gradle#L76
But when running from a Jar independent of that, the PATH variable needs to be set for the JVM process either by having it configured in the PATH
environment variable for the system or user, or starting the JVM using something that can configure that for just the JVM process. An example of this is using SETLOCAL
/ENDLOCAL
(docs) in a batch file which runs your command. Another example would be starting the JVM process using Process class in .NET which allows you to modify environment variable for a process like this:
Process nuixProcess = new Process();
...
...
string engineBinDir = "<ENGINE_BIN_DIR>";
string enginex86BinDir = "<ENGINE_X86_BIN_DIR>";
string existingPath = Environment.GetEnvironment("PATH");
nuixProcess.StartInfo.EnvironmentVariables.Add("PATH", existingPath+";"+engineBinDir+";"+enginex86BinDir );
from nuix-java-engine-baseline.
So as an example of confirming what the PATH is set to, you could have this code run very early on in your project:
// Print out the current PATH env var as seen by the process this code resides in
String currentPath = System.getenv("PATH");
System.out.println("Current PATH: "+currentPath);
Which should result in output like the following
Current PATH: D:\NuixEngineRelease\bin;D:\NuixEngineRelease\bin\x86
As you can see, my PATH
points to both bin
and bin/x86
directories of my Nuix engine release.
from nuix-java-engine-baseline.
Related Issues (12)
- Thirdparty dependency checker issue HOT 3
- Nuix Java API Project - Switching Engine Releases at runtime HOT 3
- java.lang.NoClassDefFoundError when switching to Nuix Engine engine-dist-win32-amd64-9.6.6.317 HOT 3
- What is this? HOT 5
- LicenseProperties class not found in nuix-scripting-api-9.10.9.584.jar HOT 1
- Basic example is not working: ClassNotFoundException for org.picocontainer.MutablePicoContainer HOT 4
- Incorporate system property 'nuix.libdir' HOT 1
- CLS license support HOT 2
- How do i implement Processor for addeing evidence to case HOT 2
- CLS licence never gets released HOT 3
- Execution hangs after iterating over available server licenses HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuix-java-engine-baseline.