Oshi API
OSHI is a free Java library based on JNA (Native) that provides operating system and hardware information. This library does not require the installation of any additional native libraries and offers a cross-platform implementation for retrieving system data.
Using Oshi API, you can obtain various system information:
- Operating system version
- List of running processes
- Memory and CPU usage
- Disk and partition information
- Device and sensor data
Using the API in a Project
To add the library to your project, include the following line in your build.gradle file:
modImplementation 'com.github.oshi', name: 'oshi-core', version: '6.6.5'
This library is specifically adapted for use in the Minecraft environment and provides developers with convenient access to system information.