1. 调用执行截图文件
import org.springframework.util.ResourceUtils;
import java.io.File;
public class test
{
public static void main(String args []) {
try{
Runtime mt =Runtime.getRuntime();
File file = ResourceUtils.getFile(ResourceUtils.CLASSPATH_URL_PREFIX);
File exeFile =new File(file.getPath(),"screen_snapshot.exe");
mt.exec(exeFile.getAbsolutePath());
} catch(Exception e) {
System.out.println(e);
}
}
}
2. screen_snapshot.exe 存放地址
3. screen_snapshot.exe 下载地址