{@inheritDoc}
getRmic().log("Using Kaffe rmic", Project.MSG_VERBOSE);
Commandline cmd = setupRmicCommand();
Class c = getRmicClass();
if (c == null) {
StringBuffer buf = new StringBuffer("Cannot use Kaffe rmic, as it"
+ " is not available. None"
+ " of ");
for (int i = 0; i < RMIC_CLASSNAMES.length; i++) {
if (i != 0) {
buf.append(", ");
}
buf.append(RMIC_CLASSNAMES[i]);
}
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])) {
// 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;