Java 带有 JDK(64 位)的 SQL Developer 找不到 JVM

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31181438/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 10:45:37  来源:igfitidea点击:

SQL Developer with JDK (64 bit) cannot find JVM

javawindows-8.1oracle-sqldeveloper

提问by edd

I just wasted one morning trying to get SQL developer to work on my current setup:

我只是浪费了一个早上试图让 SQL 开发人员处理我当前的设置:

  • OS: Windows 8.1 virtual machine running on mac via Parallels.
  • No oracle client or instant client installed
  • No Java installed
  • 操作系统:通过 Parallels 在 mac 上运行的 Windows 8.1 虚拟机。
  • 未安装 oracle 客户端或即时客户端
  • 没有安装Java

The reproducible steps are

可重现的步骤是

  • I downloaded SQL Developer for Windows with JDK (all 64-bit) and unzipped it to C:/Program Files/.
  • I double clicked on C:/Program Files/sqldeveloper/sqldeveloper.exe
  • 我使用 JDK(全部 64 位)下载了适用于 Windows 的 SQL Developer 并将其解压缩到 C:/Program Files/。
  • 我双击 C:/Program Files/sqldeveloper/sqldeveloper.exe

I get the following message:

我收到以下消息:

Unable to launch the Java Virtual Machine

无法启动 Java 虚拟机

Located at path:

位于路径:

C:/Program Files/sqldeveloper/jdk/jre/bin/server/jvm.dll

C:/Program Files/sqldeveloper/jdk/jre/bin/server/jvm.dll

Can someone please help me? I also tried first installing Java 1.8 (64 bit) and then the SQL developer version without Java. This doesn't work either. When I select the location of the JDK home, it also sent one error message saying that it couldn't find any JVMs where I said. To add insult to injury, every time I follow this procedure, the Panda antivirus tells me that sqldeveloper is infected, deletes the file and encourages me to restart.

有人可以帮帮我吗?我还尝试先安装 Java 1.8(64 位),然后安装没有 Java 的 SQL 开发人员版本。这也行不通。当我选择 JDK home 的位置时,它也发送了一条错误消息,说在我说的地方找不到任何 JVM。雪上加霜的是,每次我执行此程序时,Panda 防病毒软件都会告诉我 sqldeveloper 被感染,删除文件并鼓励我重新启动。

Can someone please help me? I would mostly appreciate.

有人可以帮帮我吗?我会很感激。

Thank you very much in advance

非常感谢您提前

回答by Max77

This is because sqldeveloper.conf has an entry for the java home being used

这是因为 sqldeveloper.conf 有一个正在使用的 java home 的条目

look at this solution

看看这个解决方案

回答by Lalit Kumar B

Depending on the issue, whether it's JAVA home pathnot correctly set or missing msvcr100.dllfile, follow the below methods to rectify the problem:

根据问题,无论是JAVA home路径设置不正确还是msvcr100.dll文件丢失,请按照以下方法解决问题:

1. Issue with JAVA home path not correctly set:

1. JAVA 主路径设置不正确的问题:

Follow these steps:

按着这些次序:

  • Go to directory where SQL Developeris installed.
  • Open the /bindirectory.
  • Open sqldeveloper.confin any editor to edit.
  • Remove the complete line starting with "SetJavaHome"
  • Save and close the file
  • Start SQL Developeragain.
  • Provide the full path for java.exeon prompt.
  • 转到安装SQL Developer 的目录。
  • 打开/bin目录。
  • sqldeveloper.conf在任何编辑器中打开以进行编辑。
  • 删除以“ SetJavaHome”开头的完整行
  • 保存并关闭文件
  • 再次启动SQL Developer
  • 提供java.exe提示时的完整路径。

2. Issue with missing msvcr100.dll file:

2. 缺少 msvcr100.dll 文件的问题:

OP stated the following in his comments below:

OP 在下面的评论中说明了以下内容:

If I first install the jdk and then sql developer without Java, it tells me Unable to launch the Java Virtual Machine Located at path: C:/Program Files/Java/jdk1.8.0_45/bin/msvcr100.dll

如果我先安装 jdk,然后没有 Java 的 sql developer,它会告诉我无法启动位于路径的 Java 虚拟机:C:/Program Files/Java/jdk1.8.0_45/bin/msvcr100.dll

So, the error message is clear:

所以,错误信息很明确:

Unable to launch the Java Virtual Machine Located at path: 
C:/Program Files/Java/jdk1.8.0_45/bin/msvcr100.dll

Follow these steps:

按着这些次序:

copy:

复制:

MSVCR100.dll

from:

从:

sqldeveloper\jdk\jre\bin

to:

到:

sqldeveloper\sqldeveloper\bin

And relaunch SQL Developer again.

并再次重新启动 SQL Developer。

What is msvcr100.dll file?:

msvcr100.dll 文件是什么?

msvcr100.dllis a part of Microsoft Visual C++ and is required to run programs developed with Visual C++. Some applications like SQL Developerin the question, needs the file in the SQL Developer installation folder.

msvcr100.dll是 Microsoft Visual C++ 的一部分,需要运行使用Visual C++开发的程序。问题中的某些应用程序(如SQL Developer)需要 SQL Developer 安装文件夹中的文件。

What options are available to fix the issue?:

有哪些选项可以解决问题?

Copying it from Windows systemfolder to the installation folder of application should fix the problem. Also, you could add the PATH to the msvcr100.dll file based on 32/64 bit requirements. If the local file itself is deleted or corrupt by any chance, then it could be downloaded online or could also be reinstalled via Microsoft visual C++ 2010 Redistributable package. It is important to use the correct version based on the software. Use the 32bit dll file for 32bit software, and 64bit dll file for 64bit software.

将其从 Windows 系统文件夹复制到应用程序的安装文件夹应该可以解决问题。此外,您可以根据 32/64 位要求将 PATH 添加到 msvcr100.dll 文件。如果本地文件本身被删除或损坏,则可以在线下载或通过 Microsoft Visual C++ 2010 Redistributable 包重新安装。根据软件使用正确的版本很重要。32位软件使用32位dll文件,64位软件使用64位dll文件。

回答by Alex Poole

This looks like you might not have enough memory allocated to your Windows VM. If the JVM is configured to use more (maximum) memory than is available then you'll get this sort of error message.

这看起来您可能没有足够的内存分配给您的 Windows VM。如果 JVM 配置为使用比可用内存更多的(最大)内存,那么您将收到此类错误消息。

You can read more about SQL Developer's memory at (that) Jeff Smith's blog.

您可以在 Jeff Smith 的博客阅读更多有关 SQL Developer 内存的信息

The default settings still seem to be -Xms128m -Xmx800m. I can generate a similar error by setting -Xmx to be large than the physical RAM in my (physical) PC. So with the default settings, you will have problems if you don't have 800m of memory allocated to Windows. That doesn't seem like much, but it seems to be in the recommended window based on this knowledgebase article.

默认设置似乎仍然是-Xms128m -Xmx800m. 我可以通过将 -Xmx 设置为比我的(物理)PC 中的物理 RAM 大来生成类似的错误。因此,使用默认设置,如果您没有分配给 Windows 的 800m 内存,您将遇到问题。这看起来并不多,但它似乎在基于此知识库文章的推荐窗口

While you could attempt to reduce the JVM requirements in your product.conffile that will likely lead to other issues later, if it works at all. So increase your Windows VM memory allocation, reboot, and try to launch SQL Developer again.

虽然您可以尝试减少product.conf文件中的 JVM 要求,但如果它确实有效,那么以后可能会导致其他问题。因此,增加您的 Windows VM 内存分配,重新启动,然后再次尝试启动 SQL Developer。

回答by SVK

I have followed the steps and it worked just fine.

我已经按照步骤操作,效果很好。

1) Open the file present at : \sqldeveloper-3.2.20.09.87\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf and delete the line with setJavaHome xxx .

1) 打开文件:\sqldeveloper-3.2.20.09.87\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf 并删除带有 setJavaHome xxx 的行。

2) Click on Sqldeveloper.exe now and browse for the java.exe present in \sqldeveloper-3.2.20.09.87\sqldeveloper\jdk\jre\bin

2) 现在单击 Sqldeveloper.exe 并浏览存在于 \sqldeveloper-3.2.20.09.87\sqldeveloper\jdk\jre\bin 中的 java.exe

3) This should launch SqlDeveloper now.

3) 现在应该启动 SqlDeveloper。

Thanks.

谢谢。

回答by user272735

I run into the same error message when trying to install SQL Developer from "Windows 64-bit with JDK 8 included"zip file in my Windows 10 Enterprise.

尝试从Windows 10 Enterprise 中的“包含 JDK 8 的 Windows 64 位”zip 文件安装 SQL Developer 时遇到相同的错误消息。

Launching the most recent SQL Developer version 4.1.3 in Windows 10 shows an error:

在 Windows 10 中启动最新的 SQL Developer 版本 4.1.3 显示错误:

Unable to launch the Java Virtual Machine Located at path:
C:\Users\<USER>\Downloads\sqldeveloper-4.1.3.20.78-x64\sqldeveloper\jdk\jre\bin\server\jvm.dll

The path exists and is valid.

路径存在且有效。

The same zip file works on Windows 7 Professional.

相同的 zip 文件适用于 Windows 7 Professional。

The problem was a missing msvcr100.dll.

问题是缺少msvcr100.dll.

I simply copied C:\Program Files\Oracle\VirtualBox\msvrc100.dllto C:\Users\<USER>\Downloads\sqldeveloper-4.1.3.20.78-x64\sqldeveloper\sqldeveloper\bin\and SQL Developer started to work.

我只是复制C:\Program Files\Oracle\VirtualBox\msvrc100.dllC:\Users\<USER>\Downloads\sqldeveloper-4.1.3.20.78-x64\sqldeveloper\sqldeveloper\bin\SQL Developer 开始工作。

The details can be found from Issue running SQL Developer x64 4.1.3 with JDK.

可以从使用 JDK 运行 SQL Developer x64 4.1.3 的问题找到详细信息。

Funny that Oracle VirtualBox team can include the dll into the installation package but Oracle SQL Developer team can't.

有趣的是,Oracle VirtualBox 团队可以将 dll 包含在安装包中,但 Oracle SQL Developer 团队却不能。

回答by y.Doe

I had the same problem and solved it by copying the MSVCR100.dllfile from sqldeveloper\jdk\jre\binto the sqldeveloper\sqldeveloper\binfolder.

我遇到了同样的问题并通过将MSVCR100.dll文件复制到文件夹sqldeveloper\jdk\jre\bin来解决它sqldeveloper\sqldeveloper\bin

Credit goes to Erik Anderson from SQL Developer failed to start

归功于SQL Developer 的Erik Anderson未能启动

回答by user001

I know that people may frown on a youtube example but this worked for me and I was getting the same issue https://www.youtube.com/watch?v=ex1dyu0Px8U

我知道人们可能会对 youtube 的例子皱眉,但这对我有用,我也遇到了同样的问题 https://www.youtube.com/watch?v=ex1dyu0Px8U

It will direct you to add the correct Environmental Variables for the JDK.

它将指导您为 JDK 添加正确的环境变量。

System Properties>Advanced>Environment Variables>Path> \sqldeveloper\jdk\bin AND \sqldeveloper\jdk\bin\server

系统属性>高级>环境变量>路径>\sqldeveloper\jdk\bin AND \sqldeveloper\jdk\bin\server

回答by Chi Nguyen

If folder sqldeveloper/jdkdoesn't contain folder bin, you can copy folder binfrom folder sqldeveloper/jdk/jreinto sqldeveloper/jdk.

如果文件夹sqldeveloper/jdk不包含文件夹bin,您可以将文件夹bin从文件夹复制sqldeveloper/jdk/jresqldeveloper/jdk.

回答by andrew

Create directory binin

创建目录bin

D:\sqldeveloper\jdk\

Copy

复制

msvcr100.dll

from

D:\sqldeveloper\jdk\jre\bin

to

D:\sqldeveloper\jdk\bin

回答by David Creus Librero

Create directory "bin" in

在中创建目录“bin”

D:\sqldeveloper\jdk\ Copy

D:\sqldeveloper\jdk\复制

msvcr100.dll from

msvcr100.dll 来自

D:\sqldeveloper\jdk\jre\bin to

D:\sqldeveloper\jdk\jre\bin 到

D:\sqldeveloper\jdk\bin

D:\sqldeveloper\jdk\bin