6
votes

I've just installed Oracle 11g on Windows, but I can't seem to launch SQLDeveloper. I get the following error: "Windows is searching for SQLDEVELOPER.BAT". To locate the file yourself, click Browse".

I've looked for SQLDEVELOPER.BAT but I can't find it.

I've also tried to launch sqldeveloper.exe directly, but it asks for the path to java.exe. When I browse and select C:\Program Files (x86)\Java\jre7\bin\java.exe, but then I get the error: Cannot find a J2SE SDK installed at path: C:\Program Files (x86)\Java\jre7

When I select C:\app\mbergeron\product\11.2.0\dbhome_1\jre\1.5.0\bin\java.exe I get the same error (Cannot find a J2SE SDK)

When I select C:\app\mbergeron\product\11.2.0\dbhome_1\jdk\bin\java.exe, I get no error. It just goes back to the dialog asking for java.exe

I've tried launching sqldeveloper.exe from the console, but I'm not getting error messages in the console.

4
There isn't an sqldeveloper.bat unless you write your own. Which version of Java do you have in those two locations? The one that comes with Oracle is certainly compatible, but sqldeveloper.exe should run out of the box with that. What happens when you point it at the Oracle version - 'fails to launch' isn't too descriptive. (Maybe run it from a command prompt to see any errors if it's silent?) - Alex Poole
Using sqldeveloper.exe is the correct way to start it. What exactly is the error message when you select the Java runtime then? Did you try downloading the SQL Developer package that includes the Java runtime? - a_horse_with_no_name
Thanks. When I use sqldevelopper.exe, after I browse and select C:\Program Files (x86)\Java\jre7\bin\java.exe, the error I get is Cannot find a J2SE SDK installed at path: C:\Program Files (x86)\Java\jre7 - eborgner
@eborgner - that's because you're using a JRE, not a JDK. What happens if you point it at $ORACLE_HOME\jdk\bin\java? - Alex Poole
Thanks all for your answers. I'll got the GitBash route for now as it works fine. - eborgner

4 Answers

3
votes

-All you have to do is install Gitbash or any Shell interpreter on your windows PC. Then you have to change the target of the shortcut in the start menu.

Start Menu > Oracle - OraDb11g_home1 > Application Development > SQL Developper -> Properties

CHANGE "Target" By : C:\app\ORACLE_HOME\product\11.2.0\dbhome_1\sqldeveloper\sqldeveloper.sh

CHANGE "Start In" By : C:\app\ORACLE_HOME\product\11.2.0\dbhome_1\sqldeveloper

You can now access SQL Developer, with a direct link from your start menu.

0
votes

Hit this: Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path will be stored in ~/.sqldeveloper/jdk

0
votes

You don't need the .bat for execution!

On older SQL-Developer Versions (don't know when it changed, but around 4.x), you had to setup the path to jdk at first startup. Either by editing the product.conf file (Usually under %APPDATA%\sqldeveloper*\product.conf) or by starting sqldeveloper.exe via commandline. It will ask you then about the path within commandline, and not via GUI. This is the reason, why you should try it via commandline.

Same situation is on UNIX/LINUX.

With newer releases, it has been changed and shouldn't be required anymore.

-1
votes

Or you could just point SQLdeveloper to the java in the oracle folder: (ORACLE_HOME)/jdk/bin/Java.exe