1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting heap size in Java

Discussion in 'Programming/Internet' started by user3015703, Sep 12, 2018.

  1. user3015703

    user3015703 Guest

    I am trying to run a Java tool in Linux Ubuntu system and I keep getting the following error after the program imports 12% of the data:

    Fata Error:
    Exception in thread 'Thread-l" java.lang.OutOfMemoryError: java heap space

    I tried to set the heap size using

    java -Xms8G -Xmx16G -jar Haploview.jar

    but the error appears again exactly at same point after just using less than 500M Of the allocated Ram. Using the command 'free -m' I can see that there are lots of free RAM memory left but I don't know why Java do not use it

    Login To add answer/comment

Share This Page