OJDM Collector
The OJDM Collector is a lightweight, cross-platform tool for discovering and reporting on Java installations and runtime usage across systems.
Downloading the Collector
- Visit the Releases section of the OJDM GitHub repository.
- Under Assets, download the appropriate binary for your OS and architecture.
The naming convention is:
ojdm-collector-<version>_<os>_<architecture>
Running the Tool
-
On Windows:
Run ojdm-collector.exe -
On Linux / MacOS:
Run ./ojdm-collector
(You may need to set it as executable first: chmod +x ojdm-collector)
The collector will output a report.csv file in the same directory unless specified otherwise.
Optional Parameters
-search-paths <paths> # Comma-separated list of directories to search for Java
Example usage:
ojdm-collector -output-path=/path/to/output.csv
# Search additional directories
ojdm-collector -search-paths=/opt,/oracle,/usr
# Combine both options
ojdm-collector -search-paths=/opt,/oracle -output-path=/tmp/java_report.csv
What Data is Collected?
Each row in the generated CSV file represents a detected Java installation. Collected fields include:
- Host name
- Java binary paths (java.exe, javac)
- JDK/JRE distinction (IsJDK)
- Java home and runtime details
- JVM version, vendor, and name
- Whether the process is currently running
- Command-line arguments of running Java processes
- Logical processor count on host
These insights are especially useful for licensing validation, identifying unused versions, and assessing compliance with Oracle's Java licensing policies.
Default Search Paths
If no custom paths are specified, the collector searches common installation directories by OS:
-
Windows:
- %LOCALAPPDATA%
- C:\Program Files
- C:\Program Files (x86)
-
Linux:
- /home, /usr/bin, /usr/local, /usr/lib, /usr/share, /opt, /snap, /oracle, /bin
-
macOS:
- /Applications
Additional directories can be specified using the -search-paths parameter.
Troubleshooting
If no running Java processes are reported:
- The collector likely could not locate jinfo or jps on the system.
- Ensure at least one OpenJDK or JDK with these utilities is available in the default or specified search paths.
Tip: Placing a JDK with jinfo and jps in a known search path ensures process-level data is captured.