Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How To Increase Heap Size In Java

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 16-02-2010
Member
 
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.

Reply With Quote
  #2  
Old 16-02-2010
Member
 
Join Date: Jan 2008
Posts: 1,514
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.
Reply With Quote
  #3  
Old 16-02-2010
Member
 
Join Date: May 2008
Posts: 2,005
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:
Quote:
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:
Quote:
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.
Reply With Quote
  #4  
Old 16-02-2010
Member
 
Join Date: Apr 2008
Posts: 1,999
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
Reply With Quote
  #5  
Old 16-02-2010
Member
 
Join Date: May 2008
Posts: 2,290
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
Reply With Quote
  #6  
Old 16-02-2010
Member
 
Join Date: Apr 2008
Posts: 1,946
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 09:06 PM.