简体   繁体   English

SQLDEVELOPER:未找到安装了 JDK-11 的 JDK

[英]SQLDEVELOPER: JDK Not Found with JDK-11 installed

when running $sqldeveloper in order to open the app it returns the next message:当运行 $sqldeveloper 以打开应用程序时,它返回下一条消息:

Default JDK not found
Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/adri/.sqldeveloper/19.2.1/product.conf

I'm in ubuntu and there goes some info about my jdk installation:我在 ubuntu 中,有一些关于我的 jdk 安装的信息:

$sudo update-alternatives --config java $sudo update-alternatives --config java

There is 1 choice for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      auto mode
* 1            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

$ls /usr/lib/jvm/ $ls /usr/lib/jvm/

default-java           java-1.8.0-openjdk-amd64  openjdk-11
java-11-openjdk-amd64  java-8-openjdk-amd64

$ls java-11-openjdk-amd64/bin/ $ls java-11-openjdk-amd64/bin/

jconsole

When typing java-11-openjdk-amd64 in the sqldeveloper opened terminal (as it was asked) it turns into that message:当在 sqldeveloper 打开的终端中输入 java-11-openjdk-amd64 时(按照要求),它会变成该消息:

Error: java-11-openjdk-amd64/bin/java not found or not a valid JDK

So the file 'java' is needed but I don't have it :C所以需要文件“java”,但我没有:C

Thanks for attention.谢谢关注。 Bests,最好的,

I'm unable to add a comment as I am a new user here but I am wondering if there is something not quite right or missing in your environment.我无法添加评论,因为我是这里的新用户,但我想知道您的环境中是否存在不太正确或缺失的内容。

I just created an Ubuntu 18.04 VM to match your o/s and used the Synaptic Package Manager to install openjdk-11-jdk (which installed a couple dependent packages as well).我刚刚创建了一个 Ubuntu 18.04 VM 来匹配您的操作系统,并使用 Synaptic Package Manager 安装 openjdk-11-jdk(它还安装了几个依赖包)。 Here are the packages this process installed:以下是此过程安装的软件包:

• openjdk-11-jdk • openjdk-11-jdk-headless • openjdk-11-jre • openjdk-11-jre-headless • openjdk-11-jdk • openjdk-11-jdk-headless • openjdk-11-jre • openjdk-11-jre-headless

As thatjeffsmith mentioned the JDK is required (so that SQL Developer can use the JDWP debugging capabilities).正如jeffsmith提到的,JDK 是必需的(以便 SQL Developer 可以使用 JDWP 调试功能)。

I then unzipped the following SQL Developer package which I had previously downloaded:然后我解压缩了我之前下载的以下 SQL Developer 包:

• sqldeveloper-19.2.1.247.2212-no-jre.zip • sqldeveloper-19.2.1.247.2212-no-jre.zip

After changing to the correct directory (~/Applications/sqldeveloper/19.2/sqldeveloper in my case) I started SQL Developer as follows:更改到正确的目录(在我的情况下为 ~/Applications/sqldeveloper/19.2/sqldeveloper)后,我按如下方式启动了 SQL Developer:

./sqldeveloper.sh ./sqldeveloper.sh

I then imported my connections from a previous export and was able to connect successfully.然后我从以前的导出中导入了我的连接,并且能够成功连接。 I only did a few tests in the Worksheet and browsing objects owned by my user but I didn't encounter any issues using OpenJDK 11.我只在工作表中进行了一些测试并浏览了我的用户拥有的对象,但使用 OpenJDK 11 没有遇到任何问题。

I had previously encountered issues with OpenJDK 11 and OpenJFX 11 — you can read about that here:我之前遇到过 OpenJDK 11 和 OpenJFX 11 的问题——你可以在这里阅读:

A Tale: SQL Developer 19.2 on Ubuntu 18.04 with OpenJDK 11 and OpenJFX 11一个故事:带有 OpenJDK 11 和 OpenJFX 11 的 Ubuntu 18.04 上的 SQL Developer 19.2

The essence of that thread is that I had "pre-installed" the OpenJFX 11 libraries and that caused a conflict with the OpenJFX 12 libraries that SQL Developer installed automatically.该线程的本质是我“预安装”了 OpenJFX 11库,这导致与 SQL Developer 自动安装的 OpenJFX 12库发生冲突。

If you are still trying to pursue this I recommend ensuring you have a the JDK installed and verify as I have done in the following:如果您仍在尝试这样做,我建议您确保安装了 JDK 并按照我在以下内容中所做的进行验证:

markwill@ubuntu18-vm01:~$ which javac
/usr/bin/javac
markwill@ubuntu18-vm01:~$ javac -version
javac 11.0.4

If someone is still struggling with openJDK.如果有人还在为 openJDK 苦苦挣扎。 It won't work.它不会工作。 For some reason it just doesn't work with openjdk (despite it used to) but it does with JDK.出于某种原因,它不适用于 openjdk(尽管它曾经使用过),但它适用于 JDK。 Just go here , download the *.rpm file and install it extracting with $sudo alien --scripts and $gdebi ./[Extracted_file].只需到这里,下载 *.rpm 文件并使用 $sudo Alien --scripts 和 $gdebi ./[Extracted_file] 解压安装它。 Just provide sqldeveloper the /usr/java/jdk1.8.0_181 path.只需向 sqldeveloper 提供 /usr/java/jdk1.8.0_181 路径。

Thanks for the comments, I was going mad...谢谢你的评论,我快疯了...

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

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