Bug of the decade (see, how deep the rabbit hole goes):
If SQL-Developer is already running, it sporadically won't open more files if double clicked in Windows Explorer.
Every few month, I go through my list of workarounds:
- light cases:
a) open a second SQL-Developer-instance by double clicking …path\sqldeveloper\sqldeveloper\bin\sqldeveloper64w.exe
b) double click arbitrary *.sql, it may open in the second instance started last
c) exit the first instance without the lastly opened file, while the second instance is still good and running
d) continue work in the second instance
e) This usually also helps, if the config has some issues, so that SQL-Developer doesn't start at all or never finishes loading - just try a second instance …
- update available:
a) if 1. didn't help, check if a new download of SQL-Developer is available
b) Install over the previous version (stop the process, delete extracted folder and unzip to same location)
c) Start and import settings from previous version
d) double click *.sql and keep your fingers crossed
- serious cases:
a) shutdown all SQL-developers
b) rename profile config “%APPDATA%\SQL Developer” to “%APPDATA%\SQL Developer.bak”
c) start SQL Developer normally
d) Answer no on trying to import previous settings
e) double click *.sql and keep your fingers crossed
f) if it opened in the vanilla install, you can close SQL-Developer again, delete the empty profile a undo the rename of 3b)
- getting desperate:
a) search the Registry for any mention of "sqldeveloper" and delete it
b) reboot
c) reassociate *.sql files with …path\sqldeveloper\sqldeveloper\bin\sqldeveloper64w.exe
- finally try all of the above
a) throw in frequent reboots of windows, just in case some malicious config lingers in memory and is not wiped as you intended …
b) be really patient and every startup of sqldeveloper wait the 30 seconds, until IndexPreferencesTask is finished, before you double click another file
As you can see, I already spend considerable time on making it work again… but not this time.
In Windows 11 I got it repaired by the above, but in my Windows 10 VM, it refuses to repair.
My version is: Version 24.3.0.284.2209 - October 17, 2024 from:
https://www.oracle.com/database/sqldeveloper/technologies/download/
I use the zipped version with md5: 74ab4db40d803cd1867df8987110abbb in both cases.
Inside SQL-Developer the about dialog reports the included JRE 17.0.13 for both cases, even though there are other JDKs available on the machine.
Starting within a cmd or PowerShell I never saw any logging (neither for the first launch or a subsequent try to open a *.sql), but in a git bash, it pics up these errors:
Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.netbeans.TopSecurityManager (file:/C:/Users/holgerk/programs/sqldeveloper/netbeans/platform/lib/boot.jar)
WARNING: Please consider reporting this to the maintainers of org.netbeans.TopSecurityManager
WARNING: System::setSecurityManager will be removed in a future release
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by oracle.ide.IdeCore (file:/C:/Users/holgerk/programs/sqldeveloper/ide/extensions/oracle.ide.jar)
WARNING: Please consider reporting this to the maintainers of oracle.ide.IdeCore
WARNING: System::setSecurityManager will be removed in a future release
[To redirect Truffle log output to a file use one of the following options:
* '--log.file=<path>' if the option is passed using a guest language launcher.
* '-Dpolyglot.log.file=<path>' if the option is passed using the host Java launcher.
* Configure logging using the polyglot embedding API.]
[engine] WARNING: The polyglot context is using an implementation that does not support runtime compilation.
The guest application code will therefore be executed in interpreted mode only.
Execution only in interpreted mode will strongly impact the guest application performance.
For more information on using GraalVM see https://www.graalvm.org/java/quickstart/.
To disable this warning the '--engine.WarnInterpreterOnly=false' option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property.
The options "--log.file=truffle.log" and "-Dpolyglot.log.file=poly.log" never wrote any logging for me (tried with relative and absolute path and also searched the %APPDATA%)
The last difference I found: On normal exit of SQL-Developer, in win11 (where it can successfully launch double-clicked *.sql) I don't get further messages, but the “broken” win10 install writes one additional line:
Exception while removing reference
I can only speculate, that every running instance registers itself somewhere, so if a fresh instance is launched with the assignment of opening a file, it can try to send the filename to an already running instance and exit itself. And this registry is borked up and doesn't allow:
A) inserting new SQL Developer processes as they launch
B) removing old SQL Developer processes as they exit
C) resetting this process registry on Windows reboot
Big question: Where and how is this information found? Can we get our fingers on it?
Bye Holger
PS: @gary-graham-oracle & @thatjeffsmith-oracle I hope you are still around?