Wednesday, April 30, 2014

How do I increase the heap size available to Eclipse/MyEclipse?

How do I increase the heap size available to Eclipse/MyEclipse?

Some JVMs put restrictions on the total size of memory available on the heap space. If you are getting Out of Memory Warning while running Eclipse/MyEclipse, the VM prompt corresponding box and let the heap grow to a larger amount by passing the -vmargs command to the Eclipse launcher.

For example, the following command would run Eclipse with a heap size of 512MB,

eclipse [normal arguments] -vmargs -Xmx512M [more VM args]

1. Sometimes, the changes which are done in eclipse/MyEclipse will reflect and heap size increase. If it fails just go with step 2.

2. Change as below in the eclipse.ini/myeclipse.ini file which is located in the installation path,

-install
...,
configuration
-vmargs
-Xmx1024m
-XX:MaxPermSize=256m
-XX:ReservedCodeCacheSize=64m

And this will increase heap size to 1024MB.


Cheers and add your comments on this. :)

Sunday, April 27, 2014

Open "localhost" web server from Android Emulator using Eclipse

A localhost plainly refers the standard hostname given to the address assigned to the loopback network interface. When translating into an IP address, a localhost is always designated as 127.0.0.1.

If you want to refer to the computer which is running the Android emulator, try the IP address 10.0.2.2 instead. You can read more info from,

Refer : http://developer.android.com/tools/devices/emulator.html#networkaddresses