oracle 如何更改 SQL Developer 的设置以正确识别当前版本的 SDK
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7385550/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to change settings for SQL Developer to correctly recognize current version of SDK
提问by Lakshitha Herath
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.
我已经在我的机器上安装了 Oracle 11g r2,当我打开 Oracle SQL Developer 时,它说:java 1.6.0_02 is not supported
并告诉我安装新的 Java 版本。
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.
然后我安装了JDK 1.6.0_27并在环境变量中设置了路径并再次运行Oracle SQL Developer,但发生了同样的错误。
How can I change the settings for Oracle SQL Developer to recognize 1.6.0_27 as my SDK?
如何更改 Oracle SQL Developer 的设置以将 1.6.0_27 识别为我的 SDK?
回答by Nivas
sqldeveloper.conf
under sqldeveloper/bin
in the SQLDeveloper base directory has an entry for the java home being used.
sqldeveloper.conf
下sqldeveloper/bin
在的SQLDeveloper基本目录中有正在使用的Java主项。
(So, on Windows, if you have unzipped SQLDeveloper to C:\sqldev
then sqldeveloper.conf
is under C:\sqldev\sqldeveloper\bin
)
(因此,在 Windows 上,如果您已将 SQLDeveloper 解压缩到C:\sqldev
然后sqldeveloper.conf
在 下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.
退出 SQLDeveloper,删除此条目并重新启动 SQLDeveloper。应该会提示您输入 Java 的位置。
回答by Atilla Ozgur
In windows 10, I needed to go to following folder and change following product.conf file and set SetJavaHome directive.
在 Windows 10 中,我需要转到以下文件夹并更改以下 product.conf 文件并设置 SetJavaHome 指令。
%APPDATA%\sqldeveloper\<product-version>\product.conf
in my machine:
在我的机器上:
C:\Users\ati_o\AppData\Roaming\sqldeveloper.4.0\product.conf
with following line.
与以下行。
SetJavaHome C:\Tools\oraclejdk8
Thanks to comment from @thatjeffsmith, in MacOS or Linux/Unix, go to:
感谢@thatjeffsmith 的评论,在 MacOS 或 Linux/Unix 中,请转到:
$HOME/.sqldeveloper/<product-version>/product.conf
to set same SetJavaHome directive.
设置相同的 SetJavaHome 指令。
回答by Troydm
Go to sqldeveloper\sqldeveloper\bin and edit sqldeveloper.conf file.
转到 sqldeveloper\sqldeveloper\bin 并编辑 sqldeveloper.conf 文件。
There you'll see
在那里你会看到
SetJavaHome C:\Program Files\Java\jdk1.6.0_21
Change it to correct jdk path
将其更改为正确的 jdk 路径
回答by Marco
Yes, Oracle just made a dumb installation package to makes us waste our time...good job guys!!!
是的,Oracle 刚刚做了一个愚蠢的安装包,让我们浪费时间......干得好!
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 Nivassaid 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.
问题是,应该有一个向导/安装程序来配置 java 路径,这是因为预先配置的 jdk 不起作用。就个人而言,我不得不编辑到sqldeveloper.conf
下 sqldeveloper\bin
只是还Nivas说,改变预先配置的路径“ SetJavaHome ../../jdk
”到“ SetJavaHome C:\Program Files\Java\jdk1.8.0_73
” -更早版本的的SQLDeveloper它有Java8并确保如果你安装的SQLDeveloper 64位版本的Java要求您在路径中设置的版本也是 x64。
回答by Gabriel Hernandez
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
使用 SQL Developer 19.1 (2018) 我试图用 Java 11 安装它,但它失败了,所以幸运的是,我仍然有一个旧的 java 8 版本 jdk8u202-b08。如果发生这种情况,您需要删除此文件夹
C:\Users\<username>\AppData\Roaming\sqldeveloper
And then run the exe again
然后再次运行exe
C:\..\sqldeveloper-19.1\sqldeveloper.exe
回答by Fabio Fernandes
This workaround helped many people (including me) during the last 12 months, so you must try it if you still have the problem:
在过去的 12 个月中,此解决方法帮助了很多人(包括我),因此如果您仍然遇到问题,请务必尝试:
- Go to sqldeveloper\jdk\jre\bin folder and locate "msvcr100.dll"
- Copy this dll to C:\Windows\System32 folder
- 转到 sqldeveloper\jdk\jre\bin 文件夹并找到“msvcr100.dll”
- 将此dll复制到 C:\Windows\System32 文件夹
Obs: you will need to provide administrator authorization to finish the file copy, so you must be logged on as a true windows administrator.
Obs:您需要提供管理员权限才能完成文件复制,因此您必须以真正的Windows 管理员身份登录。
After copying the file, just try to start the sqldeveloper again. No reboot needed.
复制文件后,只需尝试再次启动sqldeveloper。无需重启。
Hope this helps you too!
希望这对你也有帮助!
回答by Bajal
Adding a solution for Mac.
添加 Mac 的解决方案。
Edit this file: /Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/jdk.conf
编辑此文件: /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.
取消对 SetJavaHome 的以下行的注释,并为其提供 JDK1.8 的完整路径。截至今天,它不适用于 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
回答by SARATH SUKUMARAN
If you have MacOS :
如果您有 MacOS:
- Get the JDK home path
eg:
/Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home
- Go to
eg :
cd /Users/sarath_sukumaran/.sqldeveloper/19.2.1
Edit product.conf to set SetJavaHome eg :
SetJavaHome /Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home
Re-open the SQL Developer and check the Java version from 'About Oracle SQL Developer' > Version
- 获取 JDK 主路径,例如:
/Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home
- 转到例如:
cd /Users/sarath_sukumaran/.sqldeveloper/19.2.1
编辑 product.conf 以设置 SetJavaHome 例如:
SetJavaHome /Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home
重新打开 SQL Developer 并从“关于 Oracle SQL Developer”> 版本检查 Java 版本
回答by Bitla
If you are using SQL developer > 4.x you can find this setting at this location on windows:
如果您使用的是 SQL developer > 4.x,您可以在 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%.
并更改SetJavaHome
为您的 JDK 路径。您可以使用 %homepath% 在命令提示符下获取用户主路径。
回答by Tejas
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
在我的情况下,sqldeveloper.conf 中没有一个条目,我下载了另一个 zip 安装,这给了我相同的 JDK 版本相同的错误,而我没有配置任何东西,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=
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=