java 调用dos命令

        String str1 = "c:\\Program Files\\WinRaR\\WinRaR.exe";
        String str2 = "u";
        String str3 = "d:\\hdx\\gg.hdx";
        String str4 = "d:\\resources\\navi.xml";
        String[] cmd = {str1, str2, str3, str4};
        Runtime.getRuntime().exec(cmd);

你可能感兴趣的:(java,dos)