4 Replies Latest reply on Jul 24, 2012 1:35 PM by sej

    java heap space

    sej

      I've been using eclipse 5.5.1, but I recently went to a new machine and I've been asked to go to MyEclipse 10.5.  Code that was running fine in 5.5.1 is now getting a java heap space error in 10.5.  The 10.5 eclipse.ini file has:

       

      #utf8 (do not remove)

      #utf8 (do not remove)

      -startup

      ../Common/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar

      --launcher.library

      ../Common/plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_64_4.2.0.v201201111650

      -install

      C:\Java\MyEclipse10.5\MyEclipse 10

      -vm

      C:\Java\MyEclipse10.5\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin\javaw.exe

      -configuration

      C:\Java\MyEclipse10.5\MyEclipse 10\configuration

      -vmargs

      -Xmx512m

      -XX:MaxPermSize=256m

      -XX:ReservedCodeCacheSize=64m

      -Dosgi.nls.warnings=ignore

       

      So I decided to bump up some of the numbers:

       

      -Xms1024m

      -Xmx2048m

       

      But I still get the java heap space.  And I've tried upping the MaxPermSize and ReservedCodeCacheSize and those do not fix anything.

       

      When I remove the sql driver file from the jboss lib directory, I no longer get the java heap space error, but of course then I get a different error because it does not find any driver file.

       

      So any ideas for this?

       

      I'm using jboss 4.0.4 and jdk 1.5.0.17.

        • 1. Re: java heap space
          peterj

          Sounds like you increased the heap size for MyEclipse. Are you sure that it was MyEclipse, and not JBoss AS, that was running out of heap space? (Each runs in its own JVM, so each has its own heap settings.)

          • 2. Re: java heap space
            sej

            I don't see any .ini file for jboss.  How would I increase the heap space for jboss?

            • 3. Re: java heap space
              peterj

              That all depends on how MyEclipse starts JBoss AS. If you are running JBoss AS manually from a command line (not using MyEclipse or any other IDE), you can edit the jboss-home/run/run.conf (or run.conf.bat) file. I don't use MyEclipse, but if is somewhat close to Eclipse, then in the Servers View, double-clcik the Jboss AS server and then click the Open Launch Config link. The config dilao shows, you can set the heap size on the Arguments tab.

              • 4. Re: java heap space
                sej

                I have added to the argments tab like you said.  Now it seems to be more hit-or-miss with the java heap space messages.  It sometimes shows the error message in the console.  But it doesn't seem to cause a problem for the browser unless I close out the browser and go into one of the apps in a new browser.