Results 1 to 6 of 6

Thread: How To Increase Heap Size In Java

  1. #1
    Join Date
    Nov 2009
    Posts
    57

    How To Increase Heap Size In Java

    Hello, I am searching for the solution from which I can able to get the solution for increasing the heap size in java for solving the error of java.lang.OutOfMemoryError. If anyone is having idea regarding it, then it will be helpful to me to solve the problem of that error. I have check it from many sources, but I am not able to get the solution for this problem. So, please help me to solve this problem.

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    Re: How To Increase Heap Size In Java

    Hello, you have told that you are getting the error of java.lang.OutOfMemoryError then it can possible that you are having the problem of the leak. It can be possible that you are having problem of the memory leak. You can solve this problem by making use of the tools such as YourKit Java Profiler that help you to identify such leaks. So, just make use of the such tools and solve your problem instead of increasing the size of the heap. So, just use such tool and solve your problem.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: How To Increase Heap Size In Java

    Hello, if you want to increase heap size in java then you will able to get the solution for your problem by the use of the following runtime parameters:
    java -Xms<initial heap size> -Xmx<maximum heap size>
    I am not sure, but if you make use of the default value then it is as below:
    java -Xms32m -Xmx128m
    If you want to set it, then you can simply use the Java Control Panel. Or it can be possible that you can simply make use of the command prompt you can simply run this command.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: How To Increase Heap Size In Java

    Hello, it is necessary to make use of the code below for checking the heap size of the java virtual machine:
    Code:
    public class  HeapSize 
    {
    public static void main(String[]args)
    {
    long Size = Runtime.getRuntime().totalMemory();
    System.out.println("Heap Size = " + Size);
    }
    }
    And then you can simply make use of the following options for changing it:
    • Xms<size> ---- For initial Java heap size
    • Xmx<size> ---- For maximum Java heap size
    • Xss<size> ---- For java thread stack size

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: How To Increase Heap Size In Java

    Hello, if you want to increase the web server heap size then you must need to make use of the steps below:
    • First you need to login with the Administration Server.
    • Here you will get the JVM Options in java tab.
    • Now just edit the Xmx256m option.
    • And set the heap size upto the higher value.
    • Now just save the setting

  6. #6
    Join Date
    Apr 2008
    Posts
    1,948

    Re: How To Increase Heap Size In Java

    Hello, I am using JDK 1.6 on my computer. Now, if I want to increase the heap size then I will follow the steps below:
    • Click on the start button.
    • Now click on Control Panel for opening the control panel.
    • Now it is necessary to opent the Java Plug-in icon and then need to open the Other Options.
    • Now click on the view by selecting the java tab.
    • Now double click on the Java Runtime Parameters and set the maxmum size.
    • And then click on OK.
    • Now you need to exit from the all of the web browsers.
    • Problem solved.

Similar Threads

  1. How to increase icon size in MAC OS X
    By Doroteo in forum Customize Desktop
    Replies: 7
    Last Post: 17-05-2011, 05:12 PM
  2. Heap Space Error in Java
    By Taylor D in forum Software Development
    Replies: 5
    Last Post: 29-01-2010, 09:57 AM
  3. Heap size in JVM and Setting max Heap Size for the JVM
    By Conner in forum Software Development
    Replies: 3
    Last Post: 19-05-2009, 08:47 PM
  4. Increase in logo size
    By strangist in forum Customize Desktop
    Replies: 5
    Last Post: 27-02-2009, 10:26 PM
  5. Increase Hotmail size to 250 MB
    By bluediamond in forum Technology & Internet
    Replies: 18
    Last Post: 15-03-2005, 08:42 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,758,837.64394 seconds with 17 queries