通过Java程序启动桌面应用

    @Test
    public void test002() {
        Runtime runtime = Runtime.getRuntime();
        try {
            runtime.exec("\"D:\\MySoftwareInstallLocation\\NavicatPremium15\\navicat.exe\"");
        } catch (IOException e) {
            e.printStackTrace();
        }

    }

 

posted @ 2023-03-26 12:51  刘世庭  阅读(4)  评论(0)    收藏  举报