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

Sami
  • 294
  • 3
  • 6
  • 16
  • somewhere from the run dialog of JDeveloper. But are you sure you want to use this IDE? – Bozho Aug 09 '10 at 17:02
  • 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. – Ido Weinstein Aug 09 '10 at 17:15
  • Thank you, it works. I had a memory leak and I had to increase the size too. – Sami Aug 11 '10 at 14:04

3 Answers3

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.

Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
KristofMols
  • 3,487
  • 2
  • 38
  • 48
  • 3
    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) – Zavael May 10 '16 at 07:52
6

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

AddVMOption -Xmx512M
AddVMOption -XX:MaxPermSize=512M

then restart JDeveloper.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Kai Sternad
  • 22,214
  • 7
  • 47
  • 42
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'

Soumya R
  • 455
  • 1
  • 5
  • 21