Java Doc for CommandlineJava.java in  » Build » ANT » org » apache » tools » ant » types » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Build » ANT » org.apache.tools.ant.types 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tools.ant.types.CommandlineJava

CommandlineJava
public class CommandlineJava implements Cloneable(Code)
A representation of a Java command line that is a composite of 2 Commandlines. One is used for the vm/options and one for the classname/arguments. It provides specific methods for a Java command line.

Inner Class :public static class SysProperties extends Environment implements Cloneable


Constructor Summary
public  CommandlineJava()
     Constructor uses the VM we are running on now.

Method Summary
public  voidaddSysproperties(SysProperties sysp)
     Add a set of system properties.
public  voidaddSysproperty(Environment.Variable sysp)
     Add a system property.
public  voidaddSyspropertyset(PropertySet sysp)
     Add a set of system properties.
public  voidclearJavaArgs()
     Clear out the java arguments.
public  Objectclone()
     Deep clone the object.
public  Commandline.ArgumentcreateArgument()
     Create a new argument to the java program.
public  PathcreateBootclasspath(Project p)
     Create a boot classpath.
Parameters:
  p - the project to use to create the path.
public  PathcreateClasspath(Project p)
     Create a classpath.
Parameters:
  p - the project to use to create the path.
public  Commandline.ArgumentcreateVmArgument()
     Create a new JVM argument.
public  StringdescribeCommand()
     Return a String that describes the command and arguments suitable for verbose output before a call to Runtime.exec(String[]).
public  StringdescribeJavaCommand()
     Return a String that describes the java command and arguments for in-VM executions.
protected  CommandlinegetActualVMCommand()
     Get the VM command parameters, including memory settings.
public  AssertionsgetAssertions()
     Get the current assertions.
public  PathgetBootclasspath()
     Get the boot classpath.
public  StringgetClassname()
     Get the name of the class to be run.
public  PathgetClasspath()
     Get the classpath for the command.
public  String[]getCommandline()
     Get the command line to run a Java vm.
public  StringgetJar()
     Get the name of the jar to be run.
public  CommandlinegetJavaCommand()
     Get the Java command to be used.
public  SysPropertiesgetSystemProperties()
     Get the system properties object.
public  CommandlinegetVmCommand()
     Get the VM command, including memory.
public  StringgetVmversion()
     Get the vm version.
protected  booleanhaveBootclasspath(boolean log)
     Determine whether the bootclasspath has been specified, and whether it shall really be used (build.sysclasspath could be set or the VM may not support it).
Parameters:
  log - whether to log a warning if a bootclasspath has beenspecified but will be ignored.
protected  booleanhaveClasspath()
     Determine whether the classpath has been specified, and whether it shall really be used or be nulled by build.sysclasspath.
public  voidrestoreSystemProperties()
     Restore the cached system properties.
public  voidsetAssertions(Assertions assertions)
     Add an assertion set to the command.
public  voidsetClassname(String classname)
     Set the classname to execute.
public  voidsetCloneVm(boolean cloneVm)
     Set whether system properties will be copied to the cloned VM--as well as the bootclasspath unless you have explicitly specified a bootclasspath.
public  voidsetJar(String jarpathname)
     Set a jar file to execute via the -jar option.
public  voidsetMaxmemory(String max)
     Specify max memory of the JVM.
public  voidsetSystemProperties()
     Cache current system properties and set them to those in this Java command.
public  voidsetVm(String vm)
     Set the executable used to start the new JVM.
public  voidsetVmversion(String value)
     Set the JVM version required.
public  intsize()
     Get the size of the java command line.
public  StringtoString()
     Get a string description.


Constructor Detail
CommandlineJava
public CommandlineJava()(Code)
Constructor uses the VM we are running on now.




Method Detail
addSysproperties
public void addSysproperties(SysProperties sysp)(Code)
Add a set of system properties.
Parameters:
  sysp - a set of properties.
since:
   Ant 1.6.3



addSysproperty
public void addSysproperty(Environment.Variable sysp)(Code)
Add a system property.
Parameters:
  sysp - a property to be set in the JVM.



addSyspropertyset
public void addSyspropertyset(PropertySet sysp)(Code)
Add a set of system properties.
Parameters:
  sysp - a set of properties.



clearJavaArgs
public void clearJavaArgs()(Code)
Clear out the java arguments.



clone
public Object clone() throws CloneNotSupportedException(Code)
Deep clone the object. a CommandlineJava object.
throws:
  BuildException - if anything went wrong.
throws:
  CloneNotSupportedException - never.



createArgument
public Commandline.Argument createArgument()(Code)
Create a new argument to the java program. an argument to be configured.



createBootclasspath
public Path createBootclasspath(Project p)(Code)
Create a boot classpath.
Parameters:
  p - the project to use to create the path. a path to be configured.
since:
   Ant 1.6



createClasspath
public Path createClasspath(Project p)(Code)
Create a classpath.
Parameters:
  p - the project to use to create the path. a path to be configured.



createVmArgument
public Commandline.Argument createVmArgument()(Code)
Create a new JVM argument. an argument to be configured.



describeCommand
public String describeCommand()(Code)
Return a String that describes the command and arguments suitable for verbose output before a call to Runtime.exec(String[]). the description string.
since:
   Ant 1.5



describeJavaCommand
public String describeJavaCommand()(Code)
Return a String that describes the java command and arguments for in-VM executions.

The class name is the executable in this context.

the description string.
since:
   Ant 1.5



getActualVMCommand
protected Commandline getActualVMCommand()(Code)
Get the VM command parameters, including memory settings. the VM command parameters.



getAssertions
public Assertions getAssertions()(Code)
Get the current assertions. assertions or null.



getBootclasspath
public Path getBootclasspath()(Code)
Get the boot classpath. boot classpath or null.



getClassname
public String getClassname()(Code)
Get the name of the class to be run. the name of the class to run or null if there is no class.
See Also:   CommandlineJava.getJar()



getClasspath
public Path getClasspath()(Code)
Get the classpath for the command. the classpath or null.



getCommandline
public String[] getCommandline()(Code)
Get the command line to run a Java vm. the list of all arguments necessary to run the vm.



getJar
public String getJar()(Code)
Get the name of the jar to be run. the pathname of the jar file to run via -jar optionor null if there is no jar to run.
See Also:   CommandlineJava.getClassname()



getJavaCommand
public Commandline getJavaCommand()(Code)
Get the Java command to be used. the java command--not a clone.



getSystemProperties
public SysProperties getSystemProperties()(Code)
Get the system properties object. The system properties object.



getVmCommand
public Commandline getVmCommand()(Code)
Get the VM command, including memory. A deep clone of the instance's VM command, with memory settings added.



getVmversion
public String getVmversion()(Code)
Get the vm version. the vm version.



haveBootclasspath
protected boolean haveBootclasspath(boolean log)(Code)
Determine whether the bootclasspath has been specified, and whether it shall really be used (build.sysclasspath could be set or the VM may not support it).
Parameters:
  log - whether to log a warning if a bootclasspath has beenspecified but will be ignored. true if the bootclasspath is to be used.
since:
   Ant 1.6



haveClasspath
protected boolean haveClasspath()(Code)
Determine whether the classpath has been specified, and whether it shall really be used or be nulled by build.sysclasspath. true if the classpath is to be used.
since:
   Ant 1.6



restoreSystemProperties
public void restoreSystemProperties() throws BuildException(Code)
Restore the cached system properties.
throws:
  BuildException - if Security prevented this operation, orthere was no system properties to restore



setAssertions
public void setAssertions(Assertions assertions)(Code)
Add an assertion set to the command.
Parameters:
  assertions - assertions to make.



setClassname
public void setClassname(String classname)(Code)
Set the classname to execute.
Parameters:
  classname - the fully qualified classname.



setCloneVm
public void setCloneVm(boolean cloneVm)(Code)
Set whether system properties will be copied to the cloned VM--as well as the bootclasspath unless you have explicitly specified a bootclasspath.
Parameters:
  cloneVm - if true copy the system properties.
since:
   Ant 1.7



setJar
public void setJar(String jarpathname)(Code)
Set a jar file to execute via the -jar option.
Parameters:
  jarpathname - the pathname of the jar to execute.



setMaxmemory
public void setMaxmemory(String max)(Code)
Specify max memory of the JVM. -mx or -Xmx depending on VM version.
Parameters:
  max - the string to pass to the jvm to specifiy the max memory.



setSystemProperties
public void setSystemProperties() throws BuildException(Code)
Cache current system properties and set them to those in this Java command.
throws:
  BuildException - if Security prevented this operation.



setVm
public void setVm(String vm)(Code)
Set the executable used to start the new JVM.
Parameters:
  vm - the executable to use.



setVmversion
public void setVmversion(String value)(Code)
Set the JVM version required.
Parameters:
  value - the version required.



size
public int size()(Code)
Get the size of the java command line. This is a fairly intensive operation, as it has to evaluate the size of many components. the total number of arguments in the java command line.
See Also:   CommandlineJava.getCommandline()



toString
public String toString()(Code)
Get a string description. the command line as a string.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.