org.apache.tools.ant.util.JavaEnvUtils Java Examples

The following examples show how to use org.apache.tools.ant.util.JavaEnvUtils. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CustomJavac.java    From netbeans with Apache License 2.0 6 votes vote down vote up
@Override
public void execute() throws BuildException {
    String src = getSource();
    if (src.matches("\\d+")) {
        src = "1." + src;
    }
    if (!JavaEnvUtils.isAtLeastJavaVersion(src)) {
        log("Cannot handle -source " + src + " from this VM; forking " + maybeFork, Project.MSG_WARN);
        super.setFork(true);
        super.setExecutable(maybeFork);
    }
    generatedClassesDir = new File(getDestdir().getParentFile(), getDestdir().getName() + "-generated");
    if (!usingExplicitIncludes) {
        cleanUpStaleClasses();
    }
    cleanUpDependDebris();
    super.execute();
}