org.apache.tools.ant.taskdefs.Javac.setClasspath()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中org.apache.tools.ant.taskdefs.Javac.setClasspath()方法的一些代码示例,展示了Javac.setClasspath()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Javac.setClasspath()方法的具体详情如下:
包路径:org.apache.tools.ant.taskdefs.Javac
类名称:Javac
方法名:setClasspath

Javac.setClasspath介绍

[英]Set the classpath to be used for this compilation.
[中]设置用于此编译的类路径。

代码示例

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

javac.setProject(project);
javac.setTaskName(getTaskName());
javac.setClasspath(classpath);
if (compiler != null) javac.setCompiler(compiler);
javac.setDebug(debug);

代码示例来源:origin: org.bluestemsoftware.open.maven.tparty/jsp-2.1

public void setClassPath(List<File> cpath) {
  Path path = new Path(project);
  for (File file: cpath) {
    path.setLocation(file);
    info.append("    cp=" + file + "\n");
  }
  javac.setClasspath(path);
}

代码示例来源:origin: org.tinygroup/org.tinygroup.jspengine

public void setClassPath(List<File> cpath) {
  Path path = new Path(project);
  for (File file : cpath) {
    path.setLocation(file);
    info.append("    cp=" + file + "\n");
  }
  javac.setClasspath(path);
}

代码示例来源:origin: org.codehaus.castor/castor-testsuite-xml-framework

classpath.setPath(System.getProperty("java.class.path"));
classpath.add(new Path(project, destDir.getAbsolutePath()));
compiler.setClasspath(classpath);
return compiler;

代码示例来源:origin: com.github.pjfanning/xmlbeans

javac.setProject(project);
javac.setTaskName(getTaskName());
javac.setClasspath(classpath);
if (compiler != null) javac.setCompiler(compiler);
javac.setDebug(debug);

代码示例来源:origin: org.apache.xmlbeans/com.springsource.org.apache.xmlbeans

javac.setProject(project);
javac.setTaskName(getTaskName());
javac.setClasspath(classpath);
if (compiler != null) javac.setCompiler(compiler);
javac.setDebug(debug);

代码示例来源:origin: org.apache.geronimo.ext.tomcat/jasper

javac.setClasspath(path);
javac.setDebug(ctxt.getOptions().getClassDebugInfo());
javac.setSrcdir(srcPath);

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

javac.setClasspath(path);
javac.setDebug(ctxt.getOptions().getClassDebugInfo());
javac.setSrcdir(srcPath);

代码示例来源:origin: org.apache.tomcat/tomcat-jasper

javac.setClasspath(path);
javac.setDebug(ctxt.getOptions().getClassDebugInfo());
javac.setSrcdir(srcPath);

代码示例来源:origin: codefollower/Tomcat-Research

javac.setClasspath(path);
javac.setDebug(ctxt.getOptions().getClassDebugInfo());
javac.setSrcdir(srcPath);

代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal

public void compile(List files, CompilationUnit cu) {
    // forward options
    if (javac.getClasspath()==null) {
      javac.setClasspath(compileClasspath);
    }
    if (javac.getSourcepath()==null && compileSourcepath!=null) {
      javac.createSourcepath().add(compileSourcepath);
    }
    if (javac.getEncoding()==null) {
      javac.setEncoding(encoding);
    }
    javac.setDestdir(destDir);
    
    Path p = javac.createSrc();
    p.add(src);
    
    Path tmpDir = new Path(getProject());
    File dir = (File) cu.getConfiguration().getJointCompilationOptions().get("stubDir");
    tmpDir.setLocation(dir);
    p.add(tmpDir);
    javac.execute();
  }
};

相关文章

微信公众号

最新文章

更多