2024-05-13 14:41:54 +08:00
|
|
|
package org.aohe;
|
|
|
|
|
2024-05-14 15:12:21 +08:00
|
|
|
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
|
2024-05-13 14:41:54 +08:00
|
|
|
public class Main {
|
|
|
|
public static void main(String[] args) {
|
2024-05-14 15:12:21 +08:00
|
|
|
log.info(" 当前系统类型: {}", SystemUtils.getOsName());
|
|
|
|
List<SaneDevice> 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());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-05-13 14:41:54 +08:00
|
|
|
}
|
|
|
|
}
|