Results 1 to 6 of 6

Thread: Heap Space Error in Java

  1. #1
    Join Date
    Dec 2009
    Posts
    18

    Heap Space Error in Java

    I am intermediate programmer in this programming world. Right now i am learning programming languages like C sharp, Java, SQL and HTML. This days i am working on the Java programming language. I have develop a mini project and run on JBuilder and i got the error i.e "Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space". I tried to increase JVM heap size by going into the project properties, then also didn't started. i have also increased VM heap size in JBuilder / bin / jbuilder.config, but still error occurs. Please help to resolve this error.

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

    Re: Heap Space Error in Java

    I think the error which is occurring while running your mini project is due to the a large image is rotated. The loading of the image would be fine, but error would coming when it is rotated, this was same problem with me. And also when use to decrease the size of the same image to 2.7MB or 100KB, this error does not occur. So, i would suggest you to decrease the image size if possible. Hope your problem get solve soon.

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Heap Space Error in Java

    I am also having the same problem as of yours , the "java.lang.OutOfMemoryError: Java heap space" error is also coming in my program. Please somebody tell me, How should i change/increase the amount of memory allocated for the use by my Java Virtual Machine using the -Xms and -Xmx command line parameters? Think so the problem is with size of heap and not something in my program. Please help me.

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: Heap Space Error in Java

    I will surely help you out, but before that i need to know/see the coding part of your program. Once i can see the coding part then i can give you the exact solution. And if your coding is correct then it would be problem with the size of heap, default size may be smaller on your machine. You need to increase the heap size and maybe you would also need command line to do that. After this check whether the problem still occurs or not.

  5. #5
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Heap Space Error in Java

    According to me, there some process going which occupying the heap and not allowing your project to use the heap. I would suggest you to use a type of program called as "profiler", which will analyze the exact amount/usage of the memory. You should run it at least once to find out who's actually hogging the memory. Once you know this, you can release that process and use the heap memory fully. Hope your problem will be fix.

  6. #6
    Join Date
    Nov 2005
    Posts
    1,323

    Re: Heap Space Error in Java

    I personally think that we always have a finite maximum of heap to use and does not matter which platform/operating you are running on. I think in Windows 32 bit this would be around 2GB. This error may comes when Java happens to make the default smaller (assuming that the programmer cannot create programs that have run away memory allocation without running into this problem and having to examine exactly what they are doing).

Similar Threads

  1. Replies: 5
    Last Post: 15-06-2011, 07:10 AM
  2. How To Increase Heap Size In Java
    By Linoo in forum Software Development
    Replies: 5
    Last Post: 16-02-2010, 06:33 PM
  3. How to put space between components in java?
    By Visala28 in forum Software Development
    Replies: 5
    Last Post: 29-01-2010, 02:45 AM
  4. What is Heap and Stack?
    By samualres in forum Software Development
    Replies: 5
    Last Post: 27-11-2009, 10:56 AM
  5. 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

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,713,952,699.42552 seconds with 17 queries