Saturday, January 5, 2013

Increase Java heap size in Eclipse to avoid not responding problems

Most of programmers had encountered not responding problems in eclipse while developing mostly Java Swing Applications. Most probably these kind of errors occurs due to less java heap size.
So, If you can change this java heap size, then you will be able to improve the performance.

click below links for information's about java heap size.
 
Following are steps for increasing and managing manually the heap size.
Go to the eclipse folder where you extract the eclipse zip file. Note the path to eclipse.exe file as shown in figure below.
 Now you can add code segment for manually managing  heap like below.
D:\eclipse\eclipse.exe -vmargs -Xms1024m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=1024m

you can change above size as you wish, for example
 
D:\eclipse\eclipse.exe -vmargs -Xms512m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m

Now, open the command prompt (click start then type cmd and press Enter).
Copy the above code (D:\eclipse\eclipse.exe -vmargs -Xms1024m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=1024m).
Then, right click on cmd and press Enter. It will open the Eclipse........

You can also make a shortcut with these setting to future use without doing this every time when you start Eclipse.
For making shortcut, go to the eclipse extracted folder and right click on Eclipse.exe and click on Create a shortcut. It will create shortcut of eclipse, now right click on that short cut and select properties like below figure.

Hence, add above code (D:\eclipse\eclipse.exe -vmargs -Xms1024m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=1024m) to target filed of that and click OK button.
Now, you can use this shortcut for starting Eclipse with these setting easily.....


 
Do not forget to leave your comments below.

4 comments:

  1. this post is very useful.thanks for this post.
    join us

    ReplyDelete
  2. I have read your blog its very attractive and impressive. I like it your blog.

    Java Online Training Java EE Online Training Java EE Online Training Java 8 online training Core Java 8 online training

    Java Online Training from India Java Online Training from India Core Java Training Online Core Java Training Online Java Training InstitutesJava Training Institutes

    ReplyDelete