In order to tune JDeveloper, perform the following steps:
Open your Oracle Home directory that we set up when installing JDeveloper, and navigate to
jdeveloper. There are two files that you want to change: the first file is
Open the file using your favorite text editor and locate the following lines:
AddVMOption –Xms AddVMOption -Xmx
You may want to increase these values if they are very low, for example, if you have more than 4 GB of RAM, you should set it to 1 GB each as shown in the following code:
AddVMOption –Xms1024M AddVMOption –Xmx1024M
Save and close the file.
jdev\bin\jdev.confpath under the
Add the following entries at the end of the file:
# optimize the JVM for strings / text editing AddVMOption -XX:+UseStringCache AddVMOption -XX:+OptimizeStringConcat AddVMOption -XX:+UseCompressedStrings # if on a 64-bit system, but using less than 32 GB RAM, this reduces object pointer memory size AddVMOption -XX:+UseCompressedOops # use an aggressive garbage collector (constant small collections) AddVMOption -XX:+AggressiveOpts # for multi-core machines, use multiple threads to create objects and reduce pause times AddVMOption -XX:+UseConcMarkSweepGC AddVMOption -XX:+UseGCOverheadLimit
These settings ensure that your JVM is optimized for your operating system. Also note that some of them are tailored depending on your Operating System architecture. So, don't just copy and paste them. Check what can apply and add accordingly.
Start JDeveloper now. You have tuned it for your operating system, and now it's time to change some general preferences of JDeveloper itself. So, let's start by starting your JDeveloper as shown in the following screenshot:
When you get a prompt that asks which mode you want to choose, leave the default value of the Studio Developer (All Features) option and click on OK.
Change the following inside preferences:
Environment: Change the Encoding to UTF-8
Navigate to Code Editor | Line Gutter and enable Show Line Numbers
Navigate to Run | Weblogic and click on Load Extension and enable FastSwap
Enable external tools by navigating to Tools | External Tools and making sure every item is selected and then clicking on OK.
JDeveloper, like all IDEs, has configuration files that can be used to tune it to work without having memory problems. These configuration files are
The first file controls the main JVM memory parameters that the JDeveloper thread will start using, and
jdev.conf is used to add any additional configuration to the JDeveloper in order to enhance its performance with multicore processors or 64-bit architecture systems.
After that, we started JDeveloper for the first time and you were prompted to select a Role or Mode. Each role is tailored towards a specific behavior.
There are 5 roles you can choose from:
Studio Developer (All Features): This includes all the features of the IDE
Customization Developer: This allows the developer to create customizable applications using the Oracle Metadata Service (MDS) framework
Database Edition: This gives access to the core database development tools
Java EE Edition: This includes features of core Java EE development only
Java Edition: This includes only features of core Java development
After starting JDeveloper, we also need to tune the JDeveloper preferences themselves. This is different since you have control over them from the JDeveloper IDE. So, you may want to change them while you are working. Secondly, it doesn't relate to the JVM thread but it's totally an application-specific property.
Doing these changes to the JDeveloper preferences can increase your performance time by preventing you from facing some problems with encoding and other stuff when you are working with other team members or a multilanguage application.
If you want to explore more properties that you can tweak with JDeveloper beyond the scope of this book, check the ADF EMG discussion at https://groups.google.com/forum/#!topic/adf-methodology/g3q8TgHtsbk.
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. You can also download the files from GitHub at https://github.com/agawish/ADF-Faces-Cookbook/archive/master.zip. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.