"... 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
Add32VMOption -Xmx
Which can be set in the file product.conf located at (in windows):
C:\Documents and Settings\Administrator\Application Data\sqldeveloper\1.0.0.0.0
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 :
Thanks Jorge, you saved my day.
ReplyDeleteIn our company we have "only" 32bit Win7 with 4 gb ram.
Thanks. This worked for me.
ReplyDelete- Volowski
Worked for me as well. Thanks a lot.
ReplyDeleteFix still good - September 2014 - many thanks
ReplyDeleteThanks Jorge, It's working :)
ReplyDelete-Sameer
Hi, for Windows 7, there is no longer any Documents & Settings, and no product.conf file stored in appdata.
ReplyDeleteYou will need to change the sqldeveloper.conf file:
“{ORACLE_HOME}\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf"
Add the 2 options as mentioned :
AddVMOption -Xmx512m
AddVMOption -Xms256m
That worked for me - Liz
Thank you Liz !.
DeleteThanks!, can you explain the why?. Thanks again
ReplyDeleteHi there. Not sure about the reasons for this to be an issue. But fortunately we found a workaround. Thanks for your feedback.
Deleteregards
thank you!
ReplyDeleteThanks very much... its very short & clean explanation....
ReplyDeletethank you :) your explantation save me time
ReplyDeletethkns so much but only 2 thing that maybe works only in my case
ReplyDelete1. 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!!!
Thanks. This piece of information helped me today. Appreciate your time in writing this article - VJ
ReplyDeleteat which line can I add it at the end
ReplyDeleteIn my case the problem was from TeamViewer. Closed that app and SqlDeveloper started normaly.
ReplyDeleteIn my case problem was TeamViewer. After closing that app, SqlDeveloper started normaly. No need to change any config files.
ReplyDeleteHi,
ReplyDeleteI am not able to find # AddVMOption -Xms128m
AddVMOption -Xms256m this files.
Can anybody help?