Tuesday, March 18, 2014

SQL Developer : Unable to create an instance of the Java Virtual Machine

Have you ever got this error message with SQL Developer ?

"... Unable to create an instance of the Java Virtual Machine ..."

It usually appears the first time you try to launch "SQL Developer" ( I have also found others get similar message with JDeveloper). The error is related to the memory allocated for the  JVM associated with the program we are trying to launch.

There are two SQLDeveloper parameter settings for this purpose :

Add32VMOption  -Xms  and
Add32VMOption  -Xmx

Which can be set in the file product.conf located at (in windows):

C:\Documents and Settings\Administrator\Application Data\sqldeveloper\

So, in my case all I had to do is apply the following changes in this file:

# SetJavaHome C:\Program Files\Java\jdk1.6.0_45 (not required but wanted to use latest JDK)
SetJavaHome C:\Program Files\Java\jdk1.7.0_51

# AddVMOption -Xms128m
AddVMOption -Xms256m

# AddVMOption -Xms800m
AddVMOption -Xmx512m

You finally get :


  1. Thanks Jorge, you saved my day.
    In our company we have "only" 32bit Win7 with 4 gb ram.

  2. Thanks. This worked for me.
    - Volowski

  3. Worked for me as well. Thanks a lot.

  4. Fix still good - September 2014 - many thanks

  5. Thanks Jorge, It's working :)

  6. Hi, for Windows 7, there is no longer any Documents & Settings, and no product.conf file stored in appdata.
    You will need to change the sqldeveloper.conf file:

    Add the 2 options as mentioned :
    AddVMOption -Xmx512m
    AddVMOption -Xms256m

    That worked for me - Liz

  7. Thanks!, can you explain the why?. Thanks again

    1. Hi there. Not sure about the reasons for this to be an issue. But fortunately we found a workaround. Thanks for your feedback.

  8. Thanks very much... its very short & clean explanation....

  9. thank you :) your explantation save me time

  10. thkns so much but only 2 thing that maybe works only in my case
    1. the directory is C:\sqldeveloper\ide\bin ('c' is where i put sqldeveloper) and the file is ide.conf
    2. i only have "SetJavaHome" but not the rest, what i do is before to "SetJavaHome" put inmediatly "C:\Program Files\Java\jdk1.7.0_51" without quotes
    the memery is the same in your case and voila... it works!!!

  11. Thanks. This piece of information helped me today. Appreciate your time in writing this article - VJ

  12. at which line can I add it at the end