processBuilder没有找到主类

时间:2017-02-22 08:45:43

标签: java processbuilder

构建的命令在命令提示符下工作正常,但它在eclipse中不起作用。这是这样的:

            String javaHome = System.getProperty("java.home");
        cmds.add(javaHome+"/bin/java");
        cmds.add("-cp");
        cmds.add(_devInstallConfig.getProperty("CP"));
       // CP = ("D:\Perforce\depot\nginst\src13920\nginst-install\repo-bootstrap-classpath-13.9.2.0-170213.1854.jar");
        cmds.add("com.oracle.cie.repository.stager.CarbStager");
        cmds.add("-repoURL "+repoURL);
        cmds.add("-props");
         cmds.add(_devInstallConfig.getProperty("PROPERTIES_FILE_LOCATION"));
         //PROPERTIES_FILE_LOCATION=("C:\Users\bpurana.ORADEV\Desktop\carb.properties");
        cmds.add("-repoBaseDir");
        cmds.add(_ngInstallLocation.getParentFile().getAbsolutePath());
        //repoBaseDir=("D:\Perforce\depot\nginst\src13920\nginst-install");
        cmds.add("-PUBLISH_TYPE=BOTH");
        cmds.add("-CARB_OUTPUT_DIR="+temp_file);
        cmds.add("-NGINST_VERSION");
        cmds.add(_devInstallConfig.getProperty("NGINST_VERSION"));

        ProcessBuilder pb = new ProcessBuilder(cmds);
        pb.directory(_ngInstallLocation.getParentFile());
        Process process = pb.start();

我看到的错误是这样的: 错误:无法找到或加载主类com.oracle.cie.repository.stager.CarbStager

编辑:我已使用实际代码更新了代码段(并分享了每个值的含义示例)

0 个答案:

没有答案