Eclipse Shortcut

In the eclipse shortcut you could specify the workspace, the virtual machine and the heap size -- this is where your object resides.

To specify this parameters, right click the eclipse shortcut then go select properties. The parameters are specified on the Target input box



Below is an example of the parameters you could specify on the target input box

 C:\Dev\Tools\Eclipse\3.0\eclipse.exe -data C:\Dev\Eclipseworkspace -vm %JAVA_HOME%\Bin\javaw.exe -vmargs -Xms512m -Xmx768m 
So let us dissect and explain the parts
The first parameter is where the eclipse executable file is located and this is the default parameter specified in the input box
 C:\Dev\Tools\Eclipse\3.0\eclipse.exe 
The second parameter is where the workspace is located.
 -data C:\Dev\Eclipseworkspace 
The third parameter is the location of your java virtual machine
 -vm %JAVA_HOME%\Bin\javaw.exe 
and the last parameter is the value of your heap size
-vmargs -Xms512m -Xmx768m 
The vmargs I'm using before was -Xms256m -Xmx512m but I'm always getting an OutOfMemory error so I increase it to -Xms512m -Xmx768m and this solves the problem. The first and second argument is the minimum and maximum memory respectively. Intuitively the values that I assign in the vmargs is a multiple of 256 (i.e. 256, 512, 768, 1024 etc) and the maximum memory I assigned is less than my computer's physical memory.


About this entry


0 comments: