java实现调用启动screen

    科技2026-04-02  11

    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 下载地址

    https://download.csdn.net/download/xu990128638/10134019

    Processed: 0.010, SQL: 9