如何更改 SQL Developer 的设置以正确识别当前版本的 SDK
我已将 Oracle 11g r2 安装到我的计算机上,当我打开 Oracle SQL Developer 时,它显示:不支持 java 1.6.0_02
并告诉我安装新的 java 版本。
然后我安装了JDK 1.6.0_27并在环境变量中设置了路径并再次运行Oracle SQL Developer,但出现了相同的错误。
如何更改 Oracle SQL Developer 的设置以将 1.6.0_27 识别为我的 SDK?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(16)
在 Windows 10 中,我需要转到以下文件夹并更改以下 Product.conf 文件并设置 SetJavaHome 指令。
在我的机器上:
使用以下行。
感谢 @thatjeffsmith 的评论,在 MacOS 或 Linux/Unix 中,请转到:
设置相同的 SetJavaHome 指令。
In windows 10, I needed to go to following folder and change following product.conf file and set SetJavaHome directive.
in my machine:
with following line.
Thanks to comment from @thatjeffsmith, in MacOS or Linux/Unix, go to:
to set same SetJavaHome directive.
SQLDeveloper 基目录中
sqldeveloper/bin
下的sqldeveloper.conf
有一个正在使用的 java home 条目。(因此,在 Windows 上,如果您已将 SQLDeveloper 解压到
C:\sqldev
,则sqldeveloper.conf
位于C:\sqldev\sqldeveloper\bin
下>)类似于:
退出 SQLDeveloper,删除此条目并重新启动 SQLDeveloper。系统应该提示您输入 Java 的位置。
sqldeveloper.conf
undersqldeveloper/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
thensqldeveloper.conf
is underC:\sqldev\sqldeveloper\bin
)Something like:
Quit SQLDeveloper, remove this entry and relaunch SQLDeveloper. You should be prompted for the location of Java.
转到 sqldeveloper\sqldeveloper\bin 并编辑 sqldeveloper.conf 文件。
在那里你会看到
将其更改为正确的 jdk 路径
Go to sqldeveloper\sqldeveloper\bin and edit sqldeveloper.conf file.
There you'll see
Change it to correct jdk path
对于 SQL Developer 19.1 (2018),我尝试使用 Java 11 安装它,但失败了,所以幸运的是,我仍然有一个旧的 java 8 版本 jdk8u202-b08。
如果发生这种情况,您需要删除此文件夹
,然后再次运行 exe
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
And then run the exe again
是的,Oracle 只是制作了一个愚蠢的安装包来让我们浪费时间......干得好!
问题是,应该有一个向导/安装程序来配置java路径,这是因为预先配置的jdk不起作用。就我个人而言,我必须编辑
sqldeveloper.conf
sqldeveloper\bin
下只是有 Nivas 说并更改预配置的路径“SetJavaHome ../../jdk" 到 "
SetJavaHome C:\Program Files\Java\jdk1.8.0_73
" - 对于早期版本的 sqldeveloper,需要具有 Java8,并且如果安装 SQLDeveloper,请确保x64版本,您在路径中设置的java版本也是x64。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.如果您使用的是 MacOS:
-> SQLDeveloper 无法在 15.0.1 上运行。(Oracle 提到 Developer 支持 Oracle JDK 8 或 11。)
-> 安装 JDK8 https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html (macOSx64)
-> 转到 cd /Users/amritshukla/.sqldeveloper/ 20.4.1
-> 编辑product.conf 添加以下行:SetJavaHome /Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home
-> 启动 SQLDeveloper
If you have MacOS:
->SQLDeveloper didn't worked on 15.0.1.(Oracle has mentioned that Developer supports either Oracle JDK 8 or 11.)
->Install JDK8 https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html (macOSx64)
->Go to cd /Users/amritshukla/.sqldeveloper/20.4.1
->Edit product.conf to add this line: SetJavaHome /Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home
->Launch SQLDeveloper
这个解决方法在过去 12 个月里帮助了很多人(包括我),所以如果您仍然遇到问题,您必须尝试一下:
观察:您需要提供管理员授权才能完成文件复制,因此您必须以真正的 Windows 管理员身份登录。
复制文件后,尝试再次启动 sqldeveloper。无需重新启动。
希望这也对您有帮助!
This workaround helped many people (including me) during the last 12 months, so you must try it if you still have the problem:
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!
如果您有 MacOS:
例如:
/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 中检查 Java 版本开发商'>版本
If you have MacOS :
eg:
/Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home
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
添加适用于 Mac 的解决方案。
编辑此文件:
/Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/jdk.conf
取消注释以下 SetJavaHome 行,并为其提供 JDK1.8 的完整路径。截至目前,它不适用于 JDK 11。
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.
如果您使用的是 SQL Developer > 4.x 中,您可以在 Windows 上的以下位置找到此设置:
并将
SetJavaHome
更改为您的 JDK 路径。您可以使用 %homepath% 在命令提示符下获取用户主路径。If you are using SQL developer > 4.x you can find this setting at this location on windows:
and change
SetJavaHome
to your JDK path. You can get the user home path on the command prompt using %homepath%.构建在其他答案之上:
对于 macOS 12.3.1(M1 处理器)、SQL Developer 21.4.3,使用 sdkman< /a> 安装 祖鲁语 11。
mkdir -p ~/.sqldeveloper/21.4.3
(这个目录不存在,所以我必须创建它)echo 'SetJavaHome $HOME/.sdkman/candidates/java/11.0。 15-zulu/zulu-11.jdk/Contents/Home'>> 〜/.sqldeveloper/21.4.3/product.conf
Building on top of other answers:
For macOS 12.3.1 (M1 processor), SQL Developer 21.4.3, using sdkman to install Zulu 11.
mkdir -p ~/.sqldeveloper/21.4.3
(this directory didn't exist so I had to create it)echo 'SetJavaHome $HOME/.sdkman/candidates/java/11.0.15-zulu/zulu-11.jdk/Contents/Home' >> ~/.sqldeveloper/21.4.3/product.conf
一种解决方案是安装最新的 Oracle SQL Developer。链接@SQL Developer 下载 。此安装将安装并使用最新的 Java 版本 1.8.x。
sqldeveloper.conf 文件位于较新的位置 ...\sqldeveloper\sqldeveloper\bin 。
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 .
要更改链接到 SQL 开发人员的 SDK 版本,请卸载其他版本的 SDK 并安装所需的版本。安装所需版本后,尝试运行 SQL Developer,它会自动提示您附加路径。您可以提供新路径。
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.
在我的情况下,sqldeveloper.conf 中没有一个条目,我下载了另一个 zip 安装,这给了我相同的 JDK 版本相同的错误,而无需我配置任何内容,S
COMPANY=Oracle
产品=SQL 开发人员
版本=19.01000942042f
版本=19.1.0
VER_FULL=19.1.0.094.2042
BUILD_LABEL=094.2042
BUILD_NUM=094.2042
版本=
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=
问题:尝试打开 Oracle sql Developer 时遇到以下错误
解决方案:
文件\Eclipse Adoptium\jdk-8.0.322.6-hotspot\jre\bin*。
将该文件从 C:\Windows\System32\msvcr100.dll 复制到
C:\Program Files\Eclipse Adoptium\jdk-8.0.322.6-hotspot\jre\bin*
Issue: I was getting following error when try to open oracle sql developer
Resolution:
Files\Eclipse Adoptium\jdk-8.0.322.6-hotspot\jre\bin*.
copied that file from C:\Windows\System32\msvcr100.dll TO
C:\Program Files\Eclipse Adoptium\jdk-8.0.322.6-hotspot\jre\bin*
如果您有 Linux 操作系统(UBUNTU)。
然后安装后转到./sqldeveloper并找到product.conf文件并将“#SetJavaHome”更改为“SetJavaHome /usr/lib/jvm/”,不要忘记删除“#”
一般在Ubuntu中,任何版本的jre安装的路径都是/usr/lib/jvm/。
安装的sqlDeveloper的路径是“cd /opt/sqldeveloper”并启动“ssh sqldeveloper.sh”
If you have a Linux OS(UBUNTU).
Then after installation go to ./sqldeveloper and find the product.conf file and change the "#SetJavaHome" to "SetJavaHome /usr/lib/jvm/" dont forget to remove the '#'
Generally in Ubuntu, the path for any version of jre installed is /usr/lib/jvm/.
The path of the installed sqlDeveloper is "cd /opt/sqldeveloper" and launch "ssh sqldeveloper.sh"