Eclipse 给出“Java 已启动但返回退出代码 13”

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

Eclipse gives “Java was started but returned exit code 13”

javaeclipsejvm

提问by Farrukh Chishti

All hell broke loose after i uninstalled my java 6 and installed java 7 (both jdk and jre). On opening eclipse it gave the error that "No JVM found at.....". So, i explicitly gave the location of javaw.exe as

在我卸载了我的 java 6 并安装了 java 7(jdk 和 jre)之后,一切都崩溃了。在打开 eclipse 时,它​​给出了“No JVM found at.....”的错误。所以,我明确地给出了 javaw.exe 的位置为

-vm

C:\Progra~2\Java\jdk1.7.0_45\bin\javaw.exe

C:\Progra~2\Java\jdk1.7.0_45\bin\javaw.exe

in the eclipse.ini file. Now it says "Java was started but returned exit code 13". Also, in the elispse.ini file i changed -Dosgi.requiredJavaVersion=1.5 to -Dosgi.requiredJavaVersion=1.7

在 eclipse.ini 文件中。现在它说“Java 已启动但返回退出代码 13”。此外,在 elispse.ini 文件中,我将 -Dosgi.requiredJavaVersion=1.5 更改为 -Dosgi.requiredJavaVersion=1.7

There are many solutions online like :

网上有很多解决方案,例如:

MyEclipse 10 does not start "Java was started but returned exit code 13"

MyEclipse 10 不启动“Java 已启动但返回退出代码 13”

but none of them works. Any insight?

但它们都不起作用。任何见解?

采纳答案by user3807936

if you have updated your jdkto 7 you are most likely to face this problem.

如果您已将您的版本更新jdk为 7,您很可能会遇到此问题。

This happens mainly due to:

发生这种情况主要是由于:

  1. incompatible sdkand jdkversions
  2. using a 32 bit java version for your 64 bit eclipse JVM(programfilex86-java)
  1. 不兼容sdkjdk版本
  2. 为 64 位 eclipse JVM( programfilex86-java)使用 32 位 java 版本

WHAT YOU HAVE TO DO : firstly check the eclipse.inifile to see if you have a path that is pointing to your jdkit should look something like this

eclipse.ini你必须做什么:首先检查文件,看看你是否有一个指向你的路径,jdk它应该看起来像这样

-vm    
C:\Program Files\Java\blah\blah\blah\javaw.exe    

if not then locate the jdk7 javaw.exefile
sample :

如果没有,则找到jdk7 个javaw.exe文件
示例:

C:\Program Files\Java\jdk1.7.0_45\jre\bin\javaw.exe 

paste -vmand the path below it into your eclipse.inifile

-vm将其下方的路径粘贴到您的eclipse.ini文件中

-vm  
C:\Program Files\Java\jdk1.7.0_45\jre\bin\javaw.exe        

make sure that you type the above just before the -vmargsand after the OpenFile

确保在之前-vmargs和之后键入上述内容OpenFile

回答by Aniket Thakur

In your eclipse.ini file simply put

在您的 eclipse.ini 文件中简单地放置

–vm
/home/aniket/jdk1.7.0_11/bin(Your path to JDK 7)

before -vmargsline.

-vmargs线前。

回答by Antonio Cachuan

I installed 32 bits ADT and It works fine without changing my configuration (Windows 7 64 bits, Java 6 32 bits).

我安装了 32 位 ADT,它在不更改我的配置(Windows 7 64 位,Java 6 32 位)的情况下运行良好。

回答by rinilnath

It would be the 32 bit version of eclipse , for instance if you are running the 32 bit version of eclipse in 64 bit JVM, this error will be the result.

这将是 eclipse 的 32 位版本,例如,如果您在 64 位 JVM 中运行 32 位版本的 eclipse,则会导致此错误。

To confirm this check for log in your configuration folder of the eclipse. Log will be as following java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM ...

要确认此检查日志,请登录您的 eclipse 配置文件夹。日志将如下所示 java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM ...

try installing the either 64 bit eclipse or run in 32 bit jvm

尝试安装 64 位 eclipse 或在 32 位 jvm 中运行

回答by silwalprabin

Instead of opening eclipse.exe , first open folder named configuration then you will get log file like 1401241141809.log ; open that log (open latest one) detail error will be listed there. Ex: java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM

首先打开名为 configuration 的文件夹,而不是打开 eclipse.exe ,然后您将获得类似 1401241141809.log 的日志文件;打开那个日志(打开最新的一个)详细错误将在那里列出。例如:java.lang.UnsatisfiedLinkError:无法在 32 位 JVM 上加载 64 位 SWT 库

means you need to have JVM and SDK of same version.

意味着您需要拥有相同版本的 JVM 和 SDK。

回答by Pir Fahim Shah

I had the same problem. i was using windows8 with 64 bit OS. I just changed the path to Program Files(*86) and then it started work. I put this line in eclipse.ini file like,

我有同样的问题。我使用的是带有 64 位操作系统的 windows8。我只是将路径更改为 Program Files(*86),然后它开始工作。我将此行放在 eclipse.ini 文件中,例如,

-vm
 C:\Program Files (x86)\Java\jre7\bin\javaw.exe

回答by Ahmad Arslan

When I uninstalled Java 8 it worked fine.

当我卸载 Java 8 时,它运行良好。

回答by Shiv

I could resolve this issue by changing JDK1.8 64bit version to JDK 1.8 32bit(x86) version

我可以通过将 JDK1.8 64bit 版本更改为 JDK 1.8 32bit(x86) 版本来解决此问题

回答by HarshitGupta

Check you PATH environment variable once. Make sure the correct location of your JDK is specified there.

检查您的 PATH 环境变量一次。确保在那里指定了 JDK 的正确位置。

回答by dreamdeveloper

enter image description hereI got this fixed by doing the below steps,

在此处输入图片说明我通过执行以下步骤解决了这个问题,

  1. The eclipse finds the JAVA executables from 'C:\ProgramData\Oracle\Java\javapath'

    2.The folder structure will contain shortcuts to the below executables, i. java.exe
    ii. javaw.exe
    iii. javaws.exe 3.For me the executable paths were pointing to my (ProgramFiles(x84)) folder location

  2. I corrected it to Program Files path(64 bit) and the issue got resolved

  1. eclipse 从“C:\ProgramData\Oracle\Java\javapath”中找到 JAVA 可执行文件

    2.文件夹结构将包含以下可执行文件的快捷方式,即。java.exe
    ii. javaw.exe
    iii. javaws.exe 3.对我来说,可执行路径指向我的 (ProgramFiles(x84)) 文件夹位置

  2. 我将其更正为程序文件路径(64 位),问题得到解决

Please find the screenshot for the same.

请找到相同的屏幕截图。