How to change settings for SQL Developer to correctly recognize current version of SDK

大憨熊 提交于 2019-11-27 07:39:44

问题


I've installed Oracle 11g r2 to my machine and when I opened Oracle SQL Developer it says: java 1.6.0_02 is not supported and telling me to install new java version.

Then I've installed JDK 1.6.0_27 and set the path in environment variables and run Oracle SQL Developer again, but the same error occurred.

How can I change the settings for Oracle SQL Developer to recognize 1.6.0_27 as my SDK?


回答1:


sqldeveloper.conf under sqldeveloper/bin in the SQLDeveloper base directory has an entry for the java home being used.

(So, on Windows, if you have unzipped SQLDeveloper to C:\sqldev then sqldeveloper.conf is under C:\sqldev\sqldeveloper\bin)

Something like:

SetJavaHome C:\Program Files\Java\jdk1.6.0_20

Quit SQLDeveloper, remove this entry and relaunch SQLDeveloper. You should be prompted for the location of Java.




回答2:


In windows 10, I needed to go to following folder and change following product.conf file and set SetJavaHome directive.

%APPDATA%\sqldeveloper\<product-version>\product.conf

in my machine:

C:\Users\ati_o\AppData\Roaming\sqldeveloper\17.4.0\product.conf

with following line.

SetJavaHome C:\Tools\oraclejdk8

Thanks to comment from @thatjeffsmith, in MacOS or Linux/Unix, go to:

$HOME/.sqldeveloper/<product-version>/product.conf

to set same SetJavaHome directive.




回答3:


Go to sqldeveloper\sqldeveloper\bin and edit sqldeveloper.conf file.

There you'll see

SetJavaHome C:\Program Files\Java\jdk1.6.0_21

Change it to correct jdk path




回答4:


Yes, Oracle just made a dumb installation package to makes us waste our time...good job guys!!!

The thing is, there should be a wizard/installer to configure the java path, this is because the jdk that comes pre-configured just doesn't work. Personally, I had to edit to the sqldeveloper.conf under sqldeveloper\bin just has Nivas said and change the pre-configured path "SetJavaHome ../../jdk" to "SetJavaHome C:\Program Files\Java\jdk1.8.0_73" - for earlier versions of sqldeveloper it's a requirement to have Java8 and be sure that if you install SQLDeveloper x64 version that the java version that you set in your path is also x64.




回答5:


With SQL Developer 19.1 (2018) I tried to install it with Java 11 but it failed, so for luck I still have an old java 8 version jdk8u202-b08. If that happens you need to remove this folder

C:\Users\<username>\AppData\Roaming\sqldeveloper

And then run the exe again

C:\..\sqldeveloper-19.1\sqldeveloper.exe



回答6:


This workaround helped many people (including me) during the last 12 months, so you must try it if you still have the problem:

  • Go to sqldeveloper\jdk\jre\bin folder and locate "msvcr100.dll"
  • Copy this dll to C:\Windows\System32 folder

Obs: you will need to provide administrator authorization to finish the file copy, so you must be logged on as a true windows administrator.

After copying the file, just try to start the sqldeveloper again. No reboot needed.

Hope this helps you too!




回答7:


One solution is to install the latest Oracle SQL Developer. Link @ SQL Developer Downloads . This installation will install and use the latest Java version 1.8.x.

The sqldeveloper.conf file resides at a newer location at ...\sqldeveloper\sqldeveloper\bin .




回答8:


In order to change the version of SDK linked to your SQL developer, uninstall the other versions of SDK and install the required version. Once you install the required version, try running SQL developer it will automatically prompt you to attach the path. ANd you can provide the new path.




回答9:


None of the sqldeveloper.conf had an entry in my case, and i downloaded another zip installation, which gave me same error for same JDK versoin, without me configuring anything, S

COMPANY=Oracle PRODUCT=SQL Developer VERSION=19.01000942042f VER=19.1.0 VER_FULL=19.1.0.094.2042 BUILD_LABEL=094.2042 BUILD_NUM=094.2042 EDITION=




回答10:


Adding a solution for Mac.

Edit this file: /Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/jdk.conf

Uncomment the below line for SetJavaHome and give it the full path to JDK1.8. As of today, it does not work with JDK 11.

# By default, the product launcher will search for a JDK to use. If you wish
# to specify a JDK to use for all users of this install, uncomment the line
# below and set the path the the preferred JDK
#
# SetJavaHome /path/jdk



回答11:


If you are using SQL developer > 4.x you can find this setting at this location on windows:

<USER HOME PATH>\AppData\Roaming\sqldeveloper\<VERSION>\product.conf

and change SetJavaHome to your JDK path. You can get the user home path on the command prompt using %homepath%.



来源:https://stackoverflow.com/questions/7385550/how-to-change-settings-for-sql-developer-to-correctly-recognize-current-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!