ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Uther <>
Subject MakeExectuable task definition
Date Thu, 17 Feb 2000 19:48:21 GMT
Hi all,
  I've attached an ant task definition that people might find useful.  It
creates simple execuables for java programs.  At the moment it only handles
mac and unix.  The Mac executable is a double-clickable app (requires MRJ
2.2 or later).  The Unix executable is a simple shell-script.

Here is how I build my ant executable (yeah, I use a Mac entry-point.
Using would be fine on a command-line system.):

     <MakeExecutable output="${bin.dir}/antX"
     	classpath="${lib.dir}/${name}.jar:${classpath}" gcmax="48M"
     	properties="ant.home" mergeresourcefile="${src.bin.dir}/dAnt.rsrc"


\x/ill        :-}

Here is a description of the options.

It can handle most of the command-line options of the 'java' command:

System: Tells the task what type of executable to build.  Currently accepts
either "mac" or "unix".  Defaults to the current system.

Output: The path of the executable to be generated.

Main: The main class of the executable.

Parameters: A string containing command line parameters to be passed to the
main class.

Classpath: The argument for the -classpath option.  Currently this is
parsed and the paths are made absolute.  Might want to change this
behaviour in future.

Stdout: A filename to direct stdout to.

Stdoutappend: A boolean.  Should stdout append or replace.  Only has
meaning if stdout is defined.

Stderr and Stderrappend: As for Stdout and Stdoutappend but for stderr :).

Stdin: A file to read input from.

Verificationall: a boolean.  If true sets bytecode verification to all.  If
false sets bytcode verification to the VM default.

Verificationnone: a boolean.  If true sets bytecode verification to none.
If false sets bytcode verification to the VM default.

Verificationremote: a boolean.  If true sets bytecode verification to
remote classes only.  If false sets bytcode verification to the VM default.

Jitc: a boolean.  Should the jit be enabled?  This allows control of the
-nojit option.  Useful for debugging.

Gcmin: Specify an argument for the -ms option.

Gcmax: Specify an agrument for the -mx option.

Asyncgc: a boolean.  Controls Asynchronous garbage collection.  Like the
-noasyncgc option.

Classgc: a boolean.  Controls GC of Class instances.  Like the -noclassgc

Verbose: a boolean.  Controls verbose class loading.  Like the -verbose

Properties: A comma separated list of properties.  Each property in this
list is read from the current property list and its definition is added to
executable.  Like the -D option.

Mergeresourcefile: This is a Mac specific option that allows Mac resource
files to be merged with the App.

View raw message