package org.aohe; import java.io.IOException; import java.util.List; import au.com.southsky.jfreesane.SaneDevice; import au.com.southsky.jfreesane.SaneException; import lombok.extern.slf4j.Slf4j; import org.aohe.core.sane.utils.SaneSessionUtils; import org.aohe.core.utils.SystemUtils; @Slf4j public class Main { public static void main(String[] args) { log.info(" 当前系统类型: {}", SystemUtils.getOsName()); List deviceList; try { deviceList = SaneSessionUtils.getSaneDrivers(); } catch (IOException | SaneException e) { log.info(" 获取驱动报错 {}", e.getMessage()); throw new RuntimeException(e); } for (SaneDevice sane : deviceList){ log.info(sane.getName()); } } }