sane-service/src/main/java/org/aohe/Main.java

29 lines
812 B
Java
Raw Normal View History

2024-05-13 14:41:54 +08:00
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
2024-05-13 14:41:54 +08:00
public class Main {
public static void main(String[] args) {
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
}
}