Skip to main content
Inspiring
July 29, 2013
Answered

ADT - Java memory allocation error

  • July 29, 2013
  • 1 reply
  • 1018 views

OK, this is not really an AIR issue, but maybe some of you have encountered this.

Compiling from command line with ADT used to work, but lately I'm getting this error:

Error occurred during initialization of VM

Could not reserve enough space for object heap

Error: Could not create the Java Virtual Machine.

My machine is Windows 8 x64, 8 GB RAM, there's plenty of memory available.

I tried editing adt.bat and adding -Xmx512m but I still get this error. Tried different values to no avail.

Interestingly, it happens only when I compile for iOS.

I don't know why is this happening. Any ideas?

This topic has been closed for replies.
Correct answer cmholden1

Are you using 32 or 64 bit java? If 32, try it with 64

1 reply

cmholden1Correct answer
Inspiring
July 29, 2013

Are you using 32 or 64 bit java? If 32, try it with 64

ArmandNAuthor
Inspiring
July 29, 2013

Using the 64bit Java worked. It's strange, considering that the 32bit one also (sometimes) works, but anyway, I'm glad all is fine now.

Many thanks.

Inspiring
July 29, 2013

Well, if you think about it, the 64 bit VM will address a lot more memory than the 32 bit - your 8GB will be irrelevant with a 32 bit VM.

The reason that the 32 bit sometimes works is probably due to other processes running/not running at any given time on your machine.