简体   繁体   English

Oracle SqlDeveloper JDK路径

[英]Oracle SqlDeveloper JDK path

I have recently installed sqldeveloper but i'm getting the below warning window when I try to launch it. 我最近安装了sqldeveloper但是当我尝试启动它时,我得到了以下警告窗口。 This is causing the sqldeveloper to run very very slow and it hangs frequently 这导致sqldeveloper运行得非常慢并且经常挂起

在此输入图像描述

I have tried editing the file sqldeveloper.cong as suggested in the window above but does not work 我已经尝试按照上面的窗口中的建议编辑文件sqldeveloper.cong但是不起作用

Original 原版的

SetJavaHome ../../jdk SetJavaHome ../../jdk

Update 1 更新1

SetJavaHome C:\\Program Files\\Java\\jdk1.7.0_60\\bin\\ and all other variations but still getting the above warning window SetJavaHome C:\\ Program Files \\ Java \\ jdk1.7.0_60 \\ bin \\以及所有其他变体,但仍然获得上述警告窗口

Update 2 SetJavaHome C:\\Program Files (x86)\\Java\\jre7\\bin and all other variations 更新2 SetJavaHome C:\\ Program Files(x86)\\ Java \\ jre7 \\ bin以及所有其他变体

Please suggest the correct way 请建议正确的方法

The message seems to be out of date. 该消息似乎已过时。 In version 4 that setting exists in two files, and you need to change it in the other one, which is: 在版本4中,该设置存在于两个文件中,您需要在另一个文件中更改它,即:

%APPDATA%\sqldeveloper\1.0.0.0.0\product.conf

Which you might need to expand to your actual APPDATA , which will be something like C:\\Users\\cprasad\\AppData\\Roaming . 您可能需要扩展到实际的APPDATA ,这将类似于C:\\Users\\cprasad\\AppData\\Roaming In that file you will see the SetJavaHome is currently going to be set to the path to your Java 1.8 location, so change that as you did in the sqldeveloper.conf : 在该文件中,您将看到SetJavaHome当前将被设置为Java 1.8位置的路径,因此请像在sqldeveloper.conf那样进行更改:

SetJavaHome C:\Program Files\Java\jdk1.7.0_60\bin\

If the settig is blank (in both files, I think) then it should prompt you to pick the JDK location when you launch it, if you prefer. 如果settig是空白的(我认为在两个文件中),那么它应该提示您在启动时选择JDK位置,如果您愿意的话。

another thing you could try is to rename your old jdk folder, lets say its: 你可以尝试的另一件事是重命名你的 jdk文件夹,让我们说:

C:\\Program Files\\Java\\jdk1.7.0_04 C:\\ Program Files \\ Java \\ jdk1.7.0_04

change it to saomething like: 把它改成像:

C:\\Program Files\\Java\\xxxjdk1.7.0_04 C:\\ Program Files \\ Java \\ xxxjdk1.7.0_04

Now, you should once again asked to set your jdk folder location on Oracle SqlDeveloper launch, and you can chose the right path. 现在,您应该再次要求在Oracle SqlDeveloper启动时设置您的jdk文件夹位置,并且您可以选择正确的路径。

Not the most elegant solution, but it worked for me. 不是最优雅的解决方案,但它对我有用。

Milos 米洛斯

In your SQL Developer Bin Folder find 在你的SQL Developer Bin文件夹中找到

\sqldeveloper\bin\sqldeveloper.conf

It should be 它应该是

SetJavaHome \path\to\jdk

You said it was ../../jdk originally so you could ultimatey do 1 of two things: 你说原来是../../jdk所以你可以做到两件事中的一件事:

SetJavaHome C:\Program Files\Java\jdk1.7.0_60

This is assuming that you have JDK 1.7.60 installed in that directory; 假设您在该目录中安装了JDK 1.7.60; you don't want to point it to the bin folder you want the whole JDK folder. 你不想将它指向你想要整个JDK文件夹的bin文件夹。

OR 要么

The second thing you can do is find the jdk folder in the sqldeveloper folder for me its sqldeveloper\\jdk and copy and paste the contents from C:\\Program Files\\Java\\jdk1.7.0_60 . 您可以做的第二件事是在sqldeveloper文件夹中找到sqldeveloper\\jdkjdk文件夹,然后从C:\\Program Files\\Java\\jdk1.7.0_60复制并粘贴内容。 You then have to revert your change to read 然后,您必须将更改还原为读取

SetJavaHome ../../jdk

in your sqldeveloper.conf 在你的sqldeveloper.conf中

If all else fails you can always redownload the sqldeveloper that already contains the jdk7 all zipped up and ready for you to run at will: Download SQL Developer The file I talk about is called Windows 64-bit - zip file includes the JDK 7 如果所有其他方法都失败了,你可以随时重新下载已经包含jdk7的sqldeveloper全部压缩并准备随意运行: 下载SQL Developer我所说的文件称为Windows 64-bit - zip file includes the JDK 7

I cannot believe Oracle's documentation is SO LAME! 我无法相信Oracle的文档是如此! In some documents it is misleading people to point to the JDK by specifying the path to the JDK root, eg on a Mac: 在某些文档中,通过指定JDK根的路径(例如在Mac上)来误导人们指向JDK:

/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/

Reviewing /Applications/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh revealed the method they use to set up the path: 查看/Applications/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh显示了他们用于设置路径的方法:

TMP_PATH= /usr/libexec/java_home -F -v 9 if [ -z "$TMP_PATH" ] ; then TMP_PATH= TMP_PATH= / usr / libexec / java_home -F -v 9 if [ -z "$TMP_PATH" ] ; then TMP_PATH= if [ -z "$TMP_PATH" ] ; then TMP_PATH= /usr/libexec/java_home -F -v 1.8 if [ -z "$TMP_PATH" ] ; then osascript -e 'tell app "System Events" to display dialog "SQL Developer requires a minimum of Java 8. \\nJava 8 can be downloaded from:\\n http://www.oracle.com/technetwork/java/javase/downloads/"' exit 1 fi fi if [ -z "$TMP_PATH" ] ; then TMP_PATH= / usr / libexec / java_home -F -v 1.8 if [ -z "$TMP_PATH" ] ; then osascript -e 'tell app "System Events" to display dialog "SQL Developer requires a minimum of Java 8. \\nJava 8 can be downloaded from:\\n http://www.oracle.com/technetwork/java/javase/downloads/"' exit 1 fi fi if [ -z "$TMP_PATH" ] ; then osascript -e 'tell app "System Events" to display dialog "SQL Developer requires a minimum of Java 8. \\nJava 8 can be downloaded from:\\n http://www.oracle.com/technetwork/java/javase/downloads/"' exit 1 fi fi

Executing this manually from Terminal: 从终端手动执行:

/usr/libexec/java_home -F -v 1.8 / usr / libexec / java_home -F -v 1.8

Lists the path as: 将路径列为:

/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home

And this is what you need to specify as the value for 这就是你需要指定的值

SetJavaHome /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home SetJavaHome /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home

Thank you Oracle for wasting half a day on your "product" that does NOT even support your latest Java version, also released by you. 感谢Oracle在您的“产品”上浪费了半天的时间,该产品甚至不支持您最新发布的Java版本。

On Windows,Close all the SQL Developer windows. 在Windows上,关闭所有SQL Developer窗口。 Then You need to completely delete the SQL Developer and sqldeveloper folders located in user/AppData/Roaming. 然后,您需要完全删除位于user / AppData / Roaming中的SQL Developersqldeveloper文件夹。 Finally, run the program, you will be prompted for new JDK. 最后,运行该程序,系统将提示您输入新的JDK。

Note that AppData is a hidden folder. 请注意,AppData是一个隐藏文件夹。

For those who use Mac, edit this file: 对于使用Mac的用户,请编辑此文件:

/Applications/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh

Mine had: 我有:

export JAVA_HOME=`/usr/libexec/java_home -v 1.7`

and I changed it to 1.8 and it stopped complaining about java version. 我把它改为1.8,它停止抱怨java版本。

if you use sqldeveloper 18.2.0 如果你使用sqldeveloper 18.2.0

edit %APPDATA%\sqldeveloper\18.2.0\product.conf

jdk9, jdk10, and jdk11 are not supported 不支持jdk9,jdk10和jdk11

change back to jdk 8 改回到jdk 8

for example 例如

SetJavaHome C:\Program Files\ojdkbuild\java-1.8.0-openjdk-1.8.0.191-1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM