修复Java已启动,但返回退出代码= 13 Eclipse中的错误

Eclipse is one of the best IDEs for Java and Android developers. There are many issues with Eclipse if it is not configured properly. One of the most common errors with Eclipse IDE is of the java exit code 13. It is common to get an error like Java was started but returned exit code=13.

Eclipse是Java和Android开发人员最好的IDE之一。 如果Eclipse的配置不正确,将会有很多问题。 Eclipse IDE最常见的错误之一是Java退出代码13。常见的错误是启动Java,但返回退出代码= 13。

For programming help you can checkout AssignmentOverflow.com

为了获得编程帮助,您可以签出AssignmentOverflow.com

This Eclipse error is one of the most frustrating bugs to solve if you don’t know the correct method. Here I have enlisted some possible solutions for this error. You have to try all of them one by one.

如果您不知道正确的方法,则此Eclipse错误是最令人沮丧的错误之一。 在这里,我为该错误列出了一些可能的解决方案。 您必须一一尝试。

If you want to hire a java developer, you can make use of online java test.

如果您想雇用Java开发人员,可以使用在线Java测试

如何修复Java已启动但​​返回退出代码= 13错误 (How to Fix Java was started but returned exit code=13 Error)

Method 1:

方法1:

You may get this error if the versions of java and eclipse do not match. If you have installed 64 bit java jdk on your machine and 32 bit Eclipse IDE or vice versa, then you may get this error.

如果java和eclipse的版本不匹配,您可能会收到此错误。 如果您在计算机上安装了64位Java jdk,在32位Eclipse IDE上安装了Java反之亦然,那么您可能会收到此错误。

So, ensure that you have installed both the softwares with their correct versions. If you installed different versions, you will have to uninstall the softwares and install them again with the same version.

因此,请确保您已经安装了两个软件的正确版本。 如果安装了不同版本,则必须卸载软件,然后使用相同版本再次安装它们。

Method 2:

方法2:

There are cases when you want to keep both the 32 bit version and the 64 bit version installed in your machine due to compatibility issue.

在某些情况下,由于兼容性问题,您希望同时在计算机中保留32位版本和64位版本。

When this is the scenario, you need to correctly mention the path of the system variables in the Environment Variable Settings. You have to select either 32 bit or 64 bit in both the softwares i.e., Eclipse and Java JDK.

在这种情况下,您需要在环境变量设置中正确提及系统变量的路径。 您必须在两种软件(即Eclipse和Java JDK)中选择32位或64位。

Suppose you select 32 bit versions, you need to go to the C drive in the JDK Folder of 32 bit version. Once you do that, you can copy the path and set it in the Environment Variable section. You won’t get the same error again.

假设您选择32位版本,则需要转到32位版本的JDK文件夹中的C驱动器。 完成此操作后,您可以复制路径并在“环境变量”部分中进行设置。 您不会再遇到相同的错误。

Method 3:

方法3:

Another solution to this error is by copying the Eclipse folder in the C:/Program Files folder. For some this may work. However, if it does not work, you should try putting the Eclipse Folder in the C:/Program Files (x86) folder.

解决此错误的另一种方法是将Eclipse文件夹复制到C:/ Program Files文件夹中。 对于某些人来说,这可能有效。 但是,如果不起作用,则应尝试将Eclipse文件夹放入C:/ Program Files(x86)文件夹中。

We hope that at least one of the above methods will work in your system. You may have to try all the three methods. One of them will surely solve your error message “java was started but returned exit code 13”.

我们希望以上方法中的至少一种可以在您的系统中使用。 您可能必须尝试所有三种方法。 其中之一肯定会解决您的错误消息“ java已启动但​​返回了退出代码13”。

Method 4:

方法4:

There are a lot of compatibility issues with Java 1.8 and higher versions. So, if you are not able to solve the error with the above methods, you can degrade to java 1.7 or lower version and check if the error is solved or not.

Java 1.8和更高版本存在很多兼容性问题。 因此,如果您不能通过上述方法解决错误,则可以降级到Java 1.7或更低版​​本,然后检查错误是否得到解决。

Method 5:

方法5:

If you have 32 bit and 64 bit versions installed at the same time, you need to set the Eclipse to one version of Java JDK. It should be explicitly set by the user, otherwise the default version of Java will be used which may cause this Error Code 13.

如果同时安装32位和64位版本,则需要将Eclipse设置为Java JDK的一个版本。 它应该由用户明确设置,否则将使用Java的默认版本,这可能会导致此错误代码13。

The solution to this the manipulation of the eclipse.ini file. The eclipse.ini is located in the Eclipse folder. Open that file with notepad editor in windows.

解决该问题的方法是处理eclipse.ini文件。 eclipse.ini位于Eclipse文件夹中。 在Windows中使用记事本编辑器打开该文件。

You need to add the following code before the line that includes -vmargs in the eclipse.ini file.

您需要在eclipse.ini文件中的包含-vmargs的行之前添加以下代码。

-vm

-vm

C:\Program Files\Java\jdk1.7.0_40-64\bin\javaw.exe

C:\ Program Files \ Java \ jdk1.7.0_40-64 \ bin \ javaw.exe

The second line may be different depending upon version of the java jdk installed in your machine. If you have a 32 bit JDK version, it may be found in Program Files(x86).

第二行可能会有所不同,具体取决于计算机中安装的java jdk的版本。 如果您具有32位JDK版本,则可以在Program Files(x86)中找到它。

Few important points to remember while configuring eclipse.ini file:

配置eclipse.ini文件时要记住的几点要点:

1. The Java File’s Path must be Relative Path or Absolute Path. It should not just point to the Java Home Folder.

1. Java文件的路径必须是相对路径或绝对路径。 它不应仅指向Java主文件夹。

2. The -vm option and its path should be on a separate line.

2. -vm选项及其路径应放在单独的行上。

3. The -vm option should be before -vmargs option.

3. -vm选项应该在-vmargs选项之前。

Here is the screenshot of an eclipse.ini file.

这是一个eclipse.ini文件的屏幕截图。

Fix Java was started but returned exit code=13 Error in Eclipse

Comment below if you are getting any difficulty to solve Java was started but returned exit code=13 error in eclipse. I will try to help you.

如果您在解决Java启动时遇到任何困难,但在eclipse中返回退出代码= 13错误,请在下面发表评论。 我会尽力帮助您。

翻译自: https://www.thecrazyprogrammer.com/2016/06/java-was-started-but-returned-exit-code13.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值