static gcj ant
Dhek Bhun Kho
bhun@chello.nl
Thu Jan 16 12:04:00 GMT 2003
Op do 16-01-2003, om 03:23 schreef Adam Megacz:
> Dhek Bhun Kho <bhun@chello.nl> writes:
> > I did find static linkage a lot easier to port apps. The bzipped size of
> > a static ant is just 3 MB, and it reduces startup time immensely (like
> > 400%).
>> Were you able to get gcj to compile ant? What tweaks did this require?
> I tried a few times about six months ago and couldn't get it to work.
Well in the end I found GCJ more useable than it seemed at first, the
trick was 1) to circumvent java class bytecodes at all costs 2) fgrep a
lot 3) fix some buggy classes in GCJ or hack Ant to not call these
classes (StringTokenizer, MessageFormat amongst others) 4) sieve through
all the optional tasks and core tasks, and remove sun.com.* dependencies
5) figure out how to get the resources included.
here's a static binary.
http://prdownloads.sourceforge.net/salvation/ant-glibc2.3.1-linux-2.4.19-ix86-static-0.0.2.tar.bz2?download
I know it's bad practice, but I haven't included any documentation at
all, get the real ant for that. I also discovered that I forgot to
include the CVS tasks. Never mind the project statement too much (i was
feeling funny).
BIG NOTE: be sure that the classpath does not contain any other system
runtime jars like rt.jar or classpath.jar or you'll get a 'verification'
failed error. Maybe I ought to hack the main entry point.
If you want a list of known tasks you can run a build script like this:
<target name="tasks">
<antstructure output="ant.dtd"/>
</target>
The DTD will contain known tasks (but don't forget I forget to include
the CVS tasks).
Feel free to spam me with bug reports :D
--
Dhek Bhun Kho <bhun@chello.nl>
More information about the Java
mailing list