本文整理了Java中org.apache.tools.ant.taskdefs.Java.setJar()
方法的一些代码示例,展示了Java.setJar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Java.setJar()
方法的具体详情如下:
包路径:org.apache.tools.ant.taskdefs.Java
类名称:Java
方法名:setJar
[英]Set the location of the JAR file to execute.
[中]设置要执行的JAR文件的位置。
代码示例来源:origin: codehaus-cargo/cargo
/**
* {@inheritDoc}
*/
@Override
public void setJarFile(File jarFile)
{
if (jarFile != null)
{
this.java.setJar(jarFile);
}
}
代码示例来源:origin: net.wasdev.wlp.ant/wlp-anttasks
protected void installLiberty(File jarFile) throws Exception {
Java java = (Java) getProject().createTask("java");
java.setJar(jarFile);
java.setFork(true);
java.createArg().setValue("-acceptLicense");
java.createArg().setValue(baseDir);
int exitCode = java.executeJava();
if (exitCode != 0) {
throw new BuildException("Error installing Liberty.");
}
}
代码示例来源:origin: net.sf.antenna/antenna
private void executeMPowerEmulator(String device) throws BuildException {
String arguments = utility.getQuotedName(jadFile);
log("Arguments : " + arguments, Project.MSG_VERBOSE);
Java java = new Java();
java.setProject(getProject());
java.setTaskName(getTaskName());
java.setFork(true);
java.setJar(new File(utility.getWtkRelative("player.jar")));
java.setArgs(arguments);
java.executeJava();
}
代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin
private void startContainer(final Product product)
{
final Map<String,String> systemProperties = getSystemProperties(product);
final Java java = javaTaskFactory.newJavaTask(output(product.getOutput()).systemProperties(systemProperties).
jvmArgs(product.getJvmArgs() + product.getDebugArgs()));
java.setDir(getBaseDirectory(product));
java.setJar(findServerJar(product));
java.createArg().setValue("--host");
java.createArg().setValue(product.getServer());
java.createArg().setValue("--port");
java.createArg().setValue(Integer.toString(product.getHttpPort()));
final AntJavaExecutorThread javaThread = new AntJavaExecutorThread(java);
javaThread.start();
}
代码示例来源:origin: openimaj/openimaj
protected void setup(Java java) {
if (jarFile != null) {
java.setJar(jarFile);
} else {
if (classPath == null) {
java.setClasspath(Path.systemClasspath);
} else {
java.setClasspath(new Path(java.getProject(), classPath));
}
java.setClassname(mainClass);
}
if (jvmArgs != null) {
final Argument jvmArg = java.createJvmarg();
jvmArg.setLine(jvmArgs);
}
if (args != null) {
final Argument taskArgs = java.createArg();
taskArgs.setLine(args);
}
java.getProject().addBuildListener(new SimpleListener(java, outputOut, outputErr));
java.setCloneVm(cloneVM);
}
代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin
private void startContainer(final Product product)
{
final Map<String,String> systemProperties = getSystemProperties(product);
final Java java = javaTaskFactory.newJavaTask(output(product.getOutput()).systemProperties(systemProperties).
jvmArgs(product.getJvmArgs() + product.getDebugArgs()));
java.setDir(getBaseDirectory(product));
java.setJar(findServerJar(product));
java.createArg().setValue("--host");
java.createArg().setValue(product.getServer());
java.createArg().setValue("--port");
java.createArg().setValue(Integer.toString(product.getHttpPort()));
final AntJavaExecutorThread javaThread = new AntJavaExecutorThread(java);
javaThread.start();
}
内容来源于网络,如有侵权,请联系作者删除!