Eclipse PermGen Space Out Of Memory Errors

I thought I would make a quick post on this as it's been plauging me for some time. To fix this problem I opened my eclipse.ini and pasted the following:

-vm

%JAVA_HOME%\jre\bin\javaw.exe

I also made some adjustments to the VMARGS.

-vmargs
-Xms512m
-Xmx1024m
-XX:MaxPermSize=128m

Update (12/21/2009)

The launcher in Eclipse is rather tricky. You need to make sure your .exe is named eclipse.exe. You should also launch from the directory or via batch file with the following contents.

cd C:\Programs\Eclipse\java
start eclipse.exe

The reason for this is because the eclipse launcher uses the name of the exe to read the .ini. The launcher also is not able to find the .ini if you use it from a shortcut or a launcher like Launchy.

Hope this helps fix any problems!!!