Archive for the ‘SQL Developer’ tag
SQL Developer batch file?
It’s amazing to me that there is yet another outcome from installing Oracle Database 11g on Windows 7. This one installs without an error but then raises the following error message dialog when you try to launch SQL Developer from the menu. Naturally, it seems to depend on having more than one Java JVM installed when you run the Oracle Universal Installer (OUI) without setting the %JAVA_HOME%
environment variable.
Text of error message from image:
Windows is searching for SQLSERVER.BAT. To located the file yourself, click Browse. |
While the installation release notes (E10842-02) that download or ship with the product don’t mention the %JAVA_HOME%
or %DEV_TOOLS%
environment variables, it appears you should set them before the installation. You can discover this by double clicking on the SQL Developer menu option, and then choose Properties. You should see the following in the dialog.
Windows 7 searches for the sqldeveloper.bat
file when the OUI installation fails to configure the SetJavaHome
parameter in the sqldeveloper.conf
file. OUI does configure the SetJavaHome
parameter when OUI resolves the JVM address.
You should put this in the Target field:
C:\app\<user_name>\product\11.2.0\dbhome_1\sqldeveloper\sqldeveloper\bin\sqldeveloperW.exe |
Although, that may be a simplifying assumption of what causes the problem, I didn’t go through all the Oracle Universal Installer (OUI) background tasks to discover the actual code element. Also, I didn’t take the time to retest by setting those parameters. I solved this problem by replacing the sqldeveloper.bat
value with a sqldeveloperw.exe
value in the menu link, applying the change, and saving it. If you’ve a better solution, please share it.
The configuration file is found here:
C:\> app\<user_name>\product\11.2.0\dbhome_1\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf |
While you can provide a sqldeveloper.bat
file, it’s much simpler to simply put the JVM physical address in the sqldeveloper.conf
file. That’s what I did to solve the problem and what I think the development team expects.
A valid SetJavaHome
value points to a 32-bi JVM, and in my testing environment that is:
SetJavaHome C:\Program Files (x86)\Java\jdk1.6.0_34 |
Another post on this topic can be found here. As always, I hope this saves somebody time working with the Oracle product stack.
SQL Developer JVM Fix
It’s amazing the moving parts in Oracle Database 11g, and the ones that I don’t use after installation for a while often reach out to teach me something new. That’s what happened when I went to launch SQL Developer on my Windows 7 Professional 64-bit installation.
I got the message Unable to find a Java Virtual Machine, as shown in the image below. It really means unable to find a 32-bit Java 5 or Java 6 (1.6.0_4+) SDK home. Although the installation appeared fine, it pointed the SQL Developer configuration file to an incompatible 64-bit Java 7 SDK.
You fix this error by following these steps:
- Open the
sqldeveloper.conf
file and check theSetJavaHome
parameter value. You find thesqldeveloper.conf
file in the following directory:
%ORACLE_HOME\sqldeveloper\sqldeveloper\bin |
- Install the 32-bit Java 6 (1.6.0_4+) SDK on the operating system if not installed already. You can check whether it’s installed by looking for it in the Program Files (x86) folder.
- Change the value of the
SetJavaHome
parameter to point to the new 32-bit Java 6 home directory (or folder). The following change to line 18 in thesqldeveloper.conf
file should fix it on your installation (provided that’s your version of the JVM).
18 | SetJavaHome C:\Program Files (x86)\Java\jdk1.6.0_34 |
Hope this helps those who run into the same issue.