Java.lang.OutOfMemory Java Heap Space JDeveloper
Asked Answered
C

3

10

I am writing an application on Java and it is throwing this error Java.lang.OutOfMemory Java Heap Space JDeveloper. I know that I can add java -Xmx512m to the command line to solve the problem. However, I need to run this application on JDeveloper. So, my Question is:

How to increase the size of the Heap on JDveloper?

Thank you, Sami

Chaudoin answered 9/8, 2010 at 16:59 Comment(3)
somewhere from the run dialog of JDeveloper. But are you sure you want to use this IDE?Storfer
You might want to check for memory leaks on your application, enlarging the heap size will work to some extent only. You have some good tools for runtime analysis, I use JProfiler (www.ej-technologies.com) and I checked Yourkit (www.yourkit.com) and it seemed pretty good.Penhall
Thank you, it works. I had a memory leak and I had to increase the size too.Chaudoin
V
13

Overview

The reasons JDeveloper can run out of memory include heap limits and large files.

Heap Limits

Files that control the amount of memory afforded to the JVM for JDeveloper upon startup, relative to the jdeveloper/ide/bin/ directory, include:

  • jdev.conf
  • ide.conf

Update these files as follows:

  1. Quit JDeveloper.
  2. Edit ide.conf.
  3. Append the following
    AddVMOption -Xms256M
    AddVMOption -Xmx1024M
    
  4. Edit jdev.conf.
  5. Find the AddVMOption for the "heap size."
  6. Change the values as follows:
    AddVMOption -Xmx1024M
    AddVMOption -XX:MaxPermSize=1024M
    

Large Files

JDeveloper naïvely attempts to parse files having known file extensions that are located in the project's root level directory. A sufficiently large file, such as a 3GB XML file, will cause problems. To work around this issue, create a subdirectory for the large data and move the file into it. JDeveloper will not try to find resources in arbitrary subdirectories.

Viridity answered 9/8, 2010 at 17:3 Comment(1)
for me (jdev 11.1.1.7) the files are here: jdev.conf - ..\jdeveloper\jdev\bin (I added AddVMOption -XX:MaxPermSize=512M) and the ide.conf - ..\jdeveloper\ide\bin (added AddVMOption -Xmx640M and AddVMOption -Xms256M)Groos
C
6

Edit ${JDEV_HOME}\jdev\bin\jdev.conf and set the following options:

AddVMOption -Xmx512M
AddVMOption -XX:MaxPermSize=512M

then restart JDeveloper.

Charlesettacharleston answered 9/8, 2010 at 17:9 Comment(0)
A
3

If your jDeveloper doesn't start after trying the above options, reduce the size from 1024 to 768 to 512

In 'ide.conf' change

AddVMOption -Xms256M
AddVMOption -Xmx1024M

to

AddVMOption -Xms256M
AddVMOption -Xmx768M

If this also doesn't start your jDeveloper, change it to

AddVMOption -Xms256M
AddVMOption -Xmx512M

And the same goes with 'jdev.conf'

Admittance answered 15/12, 2014 at 23:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.