Installing the Lineai Java Agent (Windows)
The agents send metadata to Lineai, they are installed on the servers upon which the applications or databases are running. The applications and databases to be scanned are specified in the agent configuration files.
Install a Certificate
Section titled “Install a Certificate”Importing root/intermediate certificate to JDK
& 'C:\Program Files (x86)\Lineai\java\AdoptOpenJDK\bin\keytool.exe' -keystore "C:\Program Files (x86)\Lineai\java\AdoptOpenJDK\lib\security\cacerts" -storepass changeit-alias lineai -file path\to\yourCertificate.cerDownload the Windows Java Agent
Section titled “Download the Windows Java Agent”Download the installer from your Lineai server package repository. In PowerShell:
Invoke-WebRequest -Uri "http://your_server/lineai/server/packages/lineai-java.msi" -OutFile "lineai-java.msi"Alternatively, from Command Prompt or PowerShell:
curl.exe -O "http://your_server/lineai/server/packages/lineai-java.msi"Replace your_server with your Lineai server hostname. You can also open that URL in a browser to download the file.
Run the Installer
Section titled “Run the Installer”- Double-click the downloaded lineai-java.msi icon to begin installation.
- Read and Accept the License Agreement and click Next.
- Enter the your Lineai URL and click Next.
- Optionally, enter a descriptive name for the agent.
- Complete the installation.
Execute or Start the Agent
Section titled “Execute or Start the Agent”The LineaiJava Agent (Windows) can be executed through a Command-Line Interface (CLI) or started through the Graphical User Interface (GUI).
The Windows CLI is in C:\Program Files (x86)\Lineai\java\run_agent.bat.
The examples assume that java is Java 11.
A list of commands executed while in the shell is saved in a text file of the current working directory.
You may be required to start a cmd terminal as an Administrator.
Commands
cd "C:\Program Files (x86)\Lineai\java"SET JAVA_HOME="%CD%\AdoptOpenJDK"%JAVA_HOME%\bin\java -Dspring.profiles.active=interactive -jar "%CD%\cc-java-agent-main.jar"Alternatively, the run_agent.bat script is used to run the agent interactively.
Commands
"C:\Program Files (x86)\Lineai\java\run_agent.bat"Double-click the Java Agent CLI shortcut on the desktop or from the Start menu below Lineai.
The agent starts in interactive mode. See Executing Agents Interactively via the CLI.
Authorize the Agent
Section titled “Authorize the Agent”For security, agents must be authorized before they will send metadata to Lineai.
Obtain AGENT_UUID and AGENT_PASSWORD from your Lineai administrator, or set these environment variables before starting the agent. If credentials are not pre-provisioned, the agent may register with the server and await administrator approval before scans are accepted.
Next Steps To run a scan, see Binary Scanning via Command Line (Java).