Class SystemInfoFactory

java.lang.Object
oshi.spi.SystemInfoFactory

@PublicApi public final class SystemInfoFactory extends Object
Factory that uses ServiceLoader to discover and select the best available SystemInfoProvider.

When both oshi-core (JNA) and oshi-core-ffm (FFM) are declared as dependencies, this factory discovers their SystemInfoProvider implementations via ServiceLoader, filters by availability, and selects the one with the highest priority.

Usage:

SystemInfoProvider si = SystemInfoFactory.create();
HardwareAbstractionLayer hal = si.getHardware();
OperatingSystem os = si.getOperatingSystem();
See Also: