0

I cannot open my sqldeveloper at the first time with the following error message, and the application just hangs on startup.

However, if I leave it there and try to open it again, then it works. If I close it and then open it again, then I will have the same error.

Does anyone know what the issue is and how to fix it? Any suggestion would be appreciated. Thanks.

java error when trying to open sqldeveloper

enter image description here

1 Answer 1

3

I've not seen this before, but

Find your product.conf file

In Windows, it's under your OS User, AppData, Roaming, sqldeveloper, 17.4 folder. In OS X/Linux, it's in $HOME/.sqldeveloper/17.4

Add this line

AddVMOption -XX:MaxDirectMemorySize=1G 

Save, try opening SQLDev again.

Sign up to request clarification or add additional context in comments.

6 Comments

Thanks. Worked for me but I had to use 4G instead of 1. MacOS 12.3.1 and SQLDeveloper 21.4.0.346.
4G...that sounds insane. Are you using Oracle Java, and what version of Java are you using?
In the "About" dialog I see: java.home /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/jre java.vendor.url java.oracle.com java.version 1.8.0_251 I just tried with 2G and seems fine, but with 1G it gives the error java.lang.OutOfMemoryError: Direct buffer memory. Funny thing is it worked fine one week ago, not sure what changed.
you'll have a much nicer experience if you use latest Java 11 or even 17 - startup and performance.
Thanks for the heads-up! With Java 17 I get a warning message at startup (but SQLDev opens without problem apparently): is it safe to use or would I be better off using Java 11 instead?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.