java-utilities
provides a very small
utilities.jar (<1KiB) for simple Java programs.
It has zero dependencies.
Simple stdout for easy integration with other tools / languages.
Works with Java 8+.
The lookup property program allows the caller to lookup a single property name.
java -cp utilities.jar LookupProperty <property.name>
This allows a more robust way to determine java.home
as compared to following symlinks from /usr/bin/java
, or the more more fragile approach:
java -XshowSettings:properties -version 2>&1 \
| grep "java.home" \
| awk -F " = " '{print $2}'
The java-utilities PyPi package provides java-utilities
as a Python library.
See README-pypi.md for more information.
The utilities.jar is checked into the repository (as opposed to uploaded to Maven Central) as it is unlikely to be depended on as a Java library.