Thursday, 31 August 2017

Oracle JDeveloper Parameters

AddVMOption -Xms2048M
AddVMOption -Xmx2048M
AddVMOption -XX:PermSize=768m
AddVMOption -XX:MaxPermSize=1024m
AddVMOption -DMainWindow.MemoryMonitorOn=true

This is another usual error encountered when deploying projects to embedded WebLogic Server in JDeveloper 11g. I have done my searching to google and lost myself on the many lengthy discussion. 
To make the life of others easy, here is the solution that I have got: 

Change the PermGen size for your internal WLS in 
\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\bin\setDomainEnv.cmd
Find the line with MEM_MAX_PERM_SIZE.
set MEM_MAX_PERM_SIZE=-XX:MaxPermSize=128m
Increase it to 256m or 512m. 


This post is based on JDev 11g R2 (but same applies for other JDev 11g versions).

Its fairly easy to enable JDeveloper 11g Heap Memory Monitor, add this property to jdev.conf file (located under JDEV_INSTALL/jdev/bin/ folder) and restart IDE:

AddVMOption -DMainWindow.MemoryMonitorOn=true


java parameters like
set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx512m -XX:+UseParallelGC
set JAVA_OPTS=%JAVA_OPTS% -XX:PermSize=256m -XX:MaxPermSize=512m

Project Properties

Here is another case which requires the change of project properties in JDeveloper: 
  • Scenario:
    • JDeveloper is used to deploy "server-setup-seed-deploy-test" target with "Run Ant Target" and it threw "java.lang.OutOfMemoryError: PermGen space" exception.[2]
  • Solution:
    • In Jdev window, right click the project file >  Project Properties > Ant > Process > Java Options:
      • -Xms512m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=1024m
    • Note that a new JVM is launched for the Ant process and it uses the above settings.
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
  7. Perm gen space error in jdev

    The Perm gen space often appears in jdeveloper when you re-run a UI application without stopping the server. This error can be avoided by adding the following to the project properties JAVA OPTIONS :- Project Properties -> Run/Debug/Profile -> Default -> Edit -> Java Options -> -Xms256m -Xmx1024m -XX:PermSize=96m -XX:MaxPermSize=512m -XX:CompileThreshold=8000

No comments:

Post a Comment