Java heap space?

  • Shaun Murray

    Shaun Murray - 2006-03-19

    I'm getting this error....  Please advice...

    Exception in thread "Spider-Thread-2" java.lang.OutOfMemoryError: Java heap space
    Exception in thread "Spider-Thread-3" java.lang.OutOfMemoryError: Java heap space

    • Tom Hey

      Tom Hey - 2006-04-02


      I'm guessing you where running Weblech on quite a large set of files? Which version of Weblech are you running and how long did it take to produce this error?

      If this was due to a large set of file you've got two options i) Run Weblech to process the files in smaller sets of files on multiple runs. ii) increase the heap space available to Java.

      Java's maximum heap size can be set when you start  Java, but it depends on which OS you're using. If you're using windows then "java -X" shows the non-standard options Java's heap sizes. I'd try something like "-Xmx512m" to set the maximum heap size to 512 Meg (It's probably a good idea to choose a value less than 70% of your machine's physical memory) If you starting Weblech from "run.bat" then you can edit it and add the "-Xmx" option into the Java command line. For Example,

      @echo off
      echo Running Spider...
      java -Xmx512m -classpath build/dist/weblech.jar;lib/log4j-1.1.3.jar weblech.ui.gui.GUISpider config/




Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks