Did you tried to compile the source without ant with javac?
I've had few similar issues in the past trying to compile large projects (with gentoo, not mac os), but in most cases increasing heap space was the only working solution.
You could try to play with "-Xms256m -Xmx512m", 128/256, etc.
Another test case, compile with javac, without ant:
mkdir build
find src/ -name "*.java" > src_files
javac -Dyour_options_here "@src_files" -d build -classpath lib/your/libraries_here
Or open the ant file, go to the javac tag and change it to something like this:
<javac fork="true"
[...]
memoryinitialsize="256m"
memorymaximumsize="512m">
</javac>
By default fork is false and javac will run ant in the same process as ant using only 64m of max heap size.
Happy trying!
Sergiy
2008/9/12 PGNet
<email@hidden>
I'm building Fedora Directory Server's Java-based admin consoles on OSX.
uname -a
Darwin mac03.pglan.com 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun 9
19:36:17 PDT 2008; root:xnu-1228.5.20~1/RELEASE_PPC Power Macintosh
I'd had Apple's Java version 1.5.0_13 installed.
With that version, building 'directoryconsole' (cvs co -r
FedoraDirectoryconsole_1_1_2), with
ant \
-Dbuilt.dir=../built \
-Dconsole.location=/usr/share/java \
-Dldapjdk.location=$JAVA_HOME
completed without build error.
But, I was having some issues at runtime. Working on trackiing it
down, I found and updated to the August update of Java. I now have,
java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-277)
Java HotSpot(TM) Client VM (build 1.5.0_16-130, mixed mode, sharing)
Rebuilding all the java-dependent Fedora prereqs completes OK.
But, @ the 'directoryconsole' ant-build, it now fails at
build:
[javac] Compiling 359 source files to /usr/local/src/fds/built/classes
BUILD FAILED
java.lang.OutOfMemoryError: Java heap space
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:99)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:575)
at java.lang.StringBuilder.append(StringBuilder.java:204)
at java.io.UnixFileSystem.resolve(UnixFileSystem.java:93)
at java.io.File.<init>(File.java:284)
at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1111)
at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1127)
...
Increasing heap space from the defaults (?) of,
"-Xms32m -Xmx128m"
to,
setenv JAVA_OPTS "-Xms512m -Xmx512m"
setenv ANT_OPTS "-Xms512m -Xmx512m"
makes no apparent difference -- with the same "BUILD FAILED" messages.
It seems that the update to build 1.5.0_16 precipitated the problem.
Any guidance as to either fix it if that is really the source, or how
to track down the problem if it's not?
Just for reference, building the consoles on Linux with java 150-sun,
160-sun, or 160-openjdk has no such problems at either default, or
higher, heap size settings.
Thanks.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden
--
vi is [[13~^[[15~^[[15~^[[19~^[[18~^ a
muk[^[[29~^[[34~^[[26~^[[32~^ch better editor than this emacs. I know
I^[[14~'ll get flamed for this but the truth has to be
said. ^[[D^[[D^[[D^[[D ^[[D^[^[[D^[[D^[[B^
exit ^X^C quit :x :wq dang it :w:w:w :x ^C^C^Z^D
-- seen on alt.religion.emacs