/** {@inheritDoc} */ @Override public boolean execute() throws BuildException { getRmic().log("Using Kaffe rmic", Project.MSG_VERBOSE); Commandline cmd = setupRmicCommand(); Class<?> c = getRmicClass(); if (c == null) { StringBuilder buf = new StringBuilder( "Cannot use Kaffe rmic, as it is not available. None of "); for (String className : RMIC_CLASSNAMES) { if (buf.length() > 0) { buf.append(", "); } buf.append(className); } buf.append( " have been found. A common solution is to set the environment variable JAVA_HOME or CLASSPATH."); throw new BuildException(buf.toString(), getRmic().getLocation()); } cmd.setExecutable(c.getName()); if (!c.getName().equals(RMIC_CLASSNAMES[RMIC_CLASSNAMES.length - 1])) { //NOSONAR // only supported since Kaffe 1.1.2 cmd.createArgument().setValue("-verbose"); getRmic().log(Commandline.describeCommand(cmd)); } ExecuteJava ej = new ExecuteJava(); ej.setJavaCommand(cmd); return ej.fork(getRmic()) == 0; }
ej.setClasspath(new Path(javah.getProject(), f.getPath())); return ej.fork(javah) == 0;
/** * Run the compilation. * @return true if the compilation succeeded * @exception BuildException if the compilation has problems. */ @Override public boolean execute() throws BuildException { attributes.log("Using kjc compiler", Project.MSG_VERBOSE); Commandline cmd = setupKjcCommand(); cmd.setExecutable("at.dms.kjc.Main"); ExecuteJava ej = new ExecuteJava(); ej.setJavaCommand(cmd); return ej.fork(getJavac()) == 0; }
execute.setClasspath(path); execute.setJavaCommand(command.getJavaCommand()); if (execute.fork(this) != 0) throw new BuildException("Could not invoke WSProvideTask", getLocation());
execute.setClasspath(path); execute.setJavaCommand(command.getJavaCommand()); if (execute.fork(this) != 0) throw new BuildException("Could not invoke WSConsumeTask", getLocation());