Try changing the shortcut to sqldeveloper64.exe instead. This will give you the CMD window when it opens. Let's see if we get any error messages of interest there when you try to open the additional files.
Once you run SQL Developer once from there - would force us to look for a 64bit JDK, you can then just run the main sqldeveloper.exe in the main folder...
I've also tried the workaround described by changing the shortcut to 'sqldeveloper64.exe' but it still crashes (Win7 x64).
A console does indeed appear but it seems it's not single instance in this case. If a double click another file in Explorer, another console opens (it's not reused).
I've tried with both the x64 file (with JDK included) and the other one "no-jre" with separate x64 JDK installed on the machine. It does not seems to make any difference.
I've also tried the new 4.0.1 version hoping that this was fixed - but still no luck.
I've tried attaching the Visual Studio Debugger to the Windows error and got some message about heap corruption, but I'm not sure if it's related to the actual cause.
It's kind of frustrating not being able to double click a sql file from Explorer.
Drag & drop also does not work until at least one worksheet is opened.
The only way to start is by CTRL+O and selecting the first file by hand.
I haven't had time to test this on a 32 bit machine.
A permanent workaround or a fix would be appreciated .
I am using SQLDev 4.0.2 (Windows 64-bit - zip file includes the JDK 7) on Win7 x64 and I am seeing the same problem, but it seems I can only reproduce it whenever SQL Developer is already running.
In summary (assuming that the .sql file type has been associated via SQL developer preference panel):
- when no SQL developer instance is running, double clicking on a .sql file works fine (SQLdev starts and opens the chosen file);
- when a SQL developer instance is already running, double clicking on a .sql file raises the error in question, leaving the running instance unchanged;
- when a SQL developer instance is already running, right clicking on a .sql file, then choosing "Open With > Choose default program..." and selecting sqldeveloper.exe (both from the main install folder and from sqldeveloper/bin folder) again raises the error in question, leaving the running instance unchanged;
- when a SQL developer instance is already running, right clicking on a .sql file, then choosing "Open With > Choose default program..." and selecting sqldeveloper64.exe (from sqldeveloper/bin folder) opens an empty console window and raises immediately the error in question (no text is shown in the console), leaving the running instance unchanged;
I seem to remember I never had such problems with version 3.2. Is anybody else (other than the OP) able to replicate the above?
Hope it helps,
it seems double clicking on a SQL file is working fine for me now.
The only thing I changed is just uninstalling a spare JDK 7u55 I had installed on my PC (please note that I installed SQLDev integrated with the JDK).
It seems to me this was sufficient to get rid of the crashes. You may want to try and see if it solves the issue also for you.
Hope it helps,
This problem has been plaguing me for ages too, but I think I've finally found the solution from this post:
"In regedit: Navigate to Computer\HKEY_CLASSES_ROOT\Applications and find your .exe name.
Navigate under its name to shell>open>command. In the Default change its location to the actual location of the executable, hit okay and then try and reassociate the file type as you normally would."
In my particular case, I browsed to Computer\HKEY_CLASSES_ROOT\Applications\sqldeveloper64W.exe\shell\Open\Command
and changed the (Default) value
from "C:\oracle\sqldeveloper\sqldeveloper-220.127.116.11.21-x64\sqldeveloper\bin\sqldeveloper64W.exe" "%1" %*
to "C:\oracle\sqldeveloper\sqldeveloper-18.104.22.168.21-x64\sqldeveloper.exe" "%1" %*
And now the file association works correctly, and now with sql developer already open, I can open another .sql file from windows explorer. Fingers crossed this is finally fixed!
Damn, one reboot and it's stopped working again. No matter what I try now, I can't get it to open a .sql file with sqldeveloper already open. Even going back to version 3 doesn't work. I wish I had never upgraded to version 4, it gives me absolutely nothing I need or use that didn't already exist in version 3, and has just screwed things up royally.
As Jeff suggested above, you should stay with the sql type's shell>open>command pointing to the sqldeveloper64W.exe, make sure you always start SQL Developer with a shortcut created from that same exe, and clean up Windows registry really well, as I comment about in
Can't open .SQL script in SQL Developer . Here is another discussion on this same topic: Re: SQLDEVELOPER 4.1 and SQL file type associations in Win7
You might try staying with the 32-bit version instead (much less trouble), but if you wish to use an Oracle client that would have to be 32-bit also.
SQL Developer Team