|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.types.CommandlineJava
A representation of a Java command line that is a composite of 2 Commandline. One is used for the vm/options and one for the classname/arguments. It provides specific methods for a java command line.
Nested Class Summary | |
static class |
CommandlineJava.SysProperties
Specialized Environment class for System properties |
Constructor Summary | |
CommandlineJava()
constructor uses the VM we are running on now. |
Method Summary | |
void |
addSysproperty(Environment.Variable sysp)
add a system property |
void |
addSyspropertyset(PropertySet sysp)
add a set of system properties |
void |
clearJavaArgs()
Clear out the java arguments. |
java.lang.Object |
clone()
clone the object; clone of all fields in the class |
Commandline.Argument |
createArgument()
create a new argument to the java program |
Path |
createBootclasspath(Project p)
|
Path |
createClasspath(Project p)
|
Commandline.Argument |
createVmArgument()
create a new JVM argument |
java.lang.String |
describeCommand()
Returns a String that describes the command and arguments suitable for verbose output before a call to Runtime.exec(String[]) |
java.lang.String |
describeJavaCommand()
Returns a String that describes the java command and arguments for in VM executions. |
Assertions |
getAssertions()
get the current assertions |
Path |
getBootclasspath()
get the boot classpath |
java.lang.String |
getClassname()
|
Path |
getClasspath()
get the classpath for the command |
java.lang.String[] |
getCommandline()
get the command line to run a java vm. |
java.lang.String |
getJar()
|
Commandline |
getJavaCommand()
get the Java command to be used. |
CommandlineJava.SysProperties |
getSystemProperties()
get the system properties object |
Commandline |
getVmCommand()
Get the VM command, including memory. |
java.lang.String |
getVmversion()
|
void |
restoreSystemProperties()
|
void |
setAssertions(Assertions assertions)
add an assertion set to the command |
void |
setClassname(java.lang.String classname)
set the classname to execute |
void |
setJar(java.lang.String jarpathname)
set a jar file to execute via the -jar option. |
void |
setMaxmemory(java.lang.String max)
Specify max memory of the JVM -mx or -Xmx depending on VM version |
void |
setSystemProperties()
cache current system properties and set them to those in this java command |
void |
setVm(java.lang.String vm)
set the executable used to start the new JVM |
void |
setVmversion(java.lang.String value)
set the JVM version required |
int |
size()
Deprecated. please dont use this -it effectively creates the entire command. |
java.lang.String |
toString()
get a string description. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CommandlineJava()
Method Detail |
public Commandline.Argument createArgument()
public Commandline.Argument createVmArgument()
public void addSysproperty(Environment.Variable sysp)
sysp
- a property to be set in the JVMpublic void addSyspropertyset(PropertySet sysp)
sysp
- a set of propertiespublic void setVm(java.lang.String vm)
vm
- public void setVmversion(java.lang.String value)
value
- public Assertions getAssertions()
public void setAssertions(Assertions assertions)
assertions
- assertions to makepublic void setJar(java.lang.String jarpathname)
jarpathname
- the pathname of the jar to executepublic java.lang.String getJar()
getClassname()
public void setClassname(java.lang.String classname)
classname
- the fully qualified classname.public java.lang.String getClassname()
getJar()
public Path createClasspath(Project p)
public Path createBootclasspath(Project p)
public java.lang.String getVmversion()
public java.lang.String[] getCommandline()
public void setMaxmemory(java.lang.String max)
public java.lang.String toString()
public java.lang.String describeCommand()
Runtime.exec(String[])
- Since:
- Ant 1.5
public java.lang.String describeJavaCommand()
The class name is the executable in this context.
public int size()
getCommandline()
public Commandline getJavaCommand()
public Commandline getVmCommand()
public Path getClasspath()
public Path getBootclasspath()
public void setSystemProperties() throws BuildException
BuildException
- if Security prevented this operationpublic void restoreSystemProperties() throws BuildException
BuildException
- if Security prevented this operation, or
there was no system properties to restorepublic CommandlineJava.SysProperties getSystemProperties()
public java.lang.Object clone()
public void clearJavaArgs()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |