Results 1 to 3 of 3

Thread: Java heap size

  1. #1
    jmdrocks is offline Member
    Join Date
    Nov 2008
    Posts
    1
    Rep Power
    0

    Default Java heap size

    Hello,

    I am trying to increase the heap size of JVM. I am using Eclipse as an IDE.

    I do so by using eclipse -vmargs -Xmx2048m..

    And when I try to see whether JVM has increased the size by
    Runtime rt = Runtime.getRuntime();
    System.out.println(rt.maxMemory());

    But I find that the memory maximum which could be allocated is just 980mb.

    Can anyone help me with this ?

    Thanks,
    Jahangir

  2. #2
    racerxadam is offline Member
    Join Date
    Jul 2008
    Posts
    68
    Rep Power
    0

    Default

    how much available memory do you have on the machine you are trying to run this on? Why does eclipse need 2G of ram?

  3. #3
    itmani2020 is offline Member
    Join Date
    Jun 2008
    Posts
    23
    Rep Power
    0

    Default regd heap size

    Hi myself also faced this and got resolved by following approach..


    Try this

    Just navigate in u r eclipse

    Windows --> prefeence-->java-->installed JRE-->click on the java version installed and click edit button right and give the value -Xmx768m in theDefault VM arguments and click ok.

    Thast it..

    Close the eclipse and open it again..

Similar Threads

  1. java.lang.OutOfMemoryError: Java heap space
    By paul in forum Advanced Java
    Replies: 11
    Last Post: 06-12-2010, 05:30 PM
  2. Java Heap Space
    By sandeeprao.techno in forum Advanced Java
    Replies: 19
    Last Post: 10-30-2008, 11:27 AM
  3. Java heap space error
    By gezzel in forum New To Java
    Replies: 19
    Last Post: 09-25-2008, 12:07 AM
  4. Java heap space?
    By javanewbie in forum New To Java
    Replies: 1
    Last Post: 06-24-2008, 06:55 PM
  5. Heap Sort in Java
    By Java Tip in forum Algorithms
    Replies: 0
    Last Post: 04-16-2008, 10:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •