how can compile so many files?

when i compile some java files(total :2012),it report a error like this:

"The system is out of resources.

Consult the following stack trace for details.

java.lang.OutOfMemoryError"

how can i resolve the memory problem? my machine memory is 256M,and i set vitual memory as 500M.

what can i do? pls help me,thanks..

[358 byte] By [jordan2003815] at [2007-9-30 4:25:18]
# 1
Which Operating system?
yashrajarora at 2007-7-1 13:04:40 > top of Java-index,Administration Tools,Sun Connection...
# 2

Do you really need to compile all those sources at the same time?

It is better for a project if there is a sequence in which it can be compiled from scratch, if not one by one, then in smaller groups. This is not possible if they strongly depend one on the other in big clusters, which is no good design anyway.

See a fine development tool:

apache/jakarta/ant

BIJ001 at 2007-7-1 13:04:40 > top of Java-index,Administration Tools,Sun Connection...
# 3
it's also has error when i use jbuilder or and tool to compile so many files..
jordan2003815 at 2007-7-1 13:04:40 > top of Java-index,Administration Tools,Sun Connection...
# 4
The obvious work-around is to compile them in smaller groups.
BIJ001 at 2007-7-1 13:04:40 > top of Java-index,Administration Tools,Sun Connection...
# 5
Try setting the java minimum heap size for stack size in the javac options:-J-Xmx128m would set the minimum heap size to 128 megs.
bfincher at 2007-7-1 13:04:40 > top of Java-index,Administration Tools,Sun Connection...