-Xmx1500m -XX:MaxPermSize=2000m -Dcom.sun.aas.instanceName=server
1. What exactly do you need 1,5 gig of RAM for when using ANT? What exactly are you launching with ant that requires so much space?
If you just plan on doing a normal ant build, even with very large scripts an huge plugins, I'm sure that 512 MB will suffice.
2. I've never come across, not even the largest
JEE Application Server deployments that require 2 GB of PermGen Space. I not even sure if that amount is allowed at all on a JVM, 32 or 64 bit versions.
I am running Windows 32 Windows Server 2008 SP2 with 2 Megabytes of RAM.
That explains it! your running WIndows Server with only 2 Megs of RAM
No seriously, I'll assume you meant 2 GB - if so you can never allocate more Heap + PermGen than you physically have on your system. I believe a 32 Bit JVM won't even let you set 1500 MB of Heap space. I've observed that on 32 Bit windows, the JVM won't let you set Heap sizes larger than 1200 - 1300 MB. Only 64 Bit JVMs let you set sizes beyond that.
A reasonable setting could be -Xmx256m (if you run out you can alway increase Heap)
Try not to change the PermSize defaults (i.e dont specify a MaxPermSize) if Ant crashes reporting a PermGen problem you can alway set a higher value like 128 MB PermGen
I'm not supposing all of my comments above are fact or true, they're all just based on experience and observations I have made with fairly large Java applications, so please correct me if I'm wrong