简体   繁体   English

Java 已启动但返回退出代码=1?

[英]Java was started but returned exit code=1?

I recently updated java and came across this error... I've changed my eclipse.ini file to the我最近更新了 java 并遇到了这个错误......我已经将我的 eclipse.ini 文件更改为

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

Yet it still doesn't work... here is the whole ini file然而它仍然不起作用......这是整个ini文件

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.cpp.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-XX:-UseCompressedOops
-vm 
C:\Program Files (x86)\Java\jre7\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms40m
-Xmx512m

Any solutions?任何解决方案? I don't know what to do我不知道该怎么办

Make sure the JAVA_HOME variable and path was set properly.确保 JAVA_HOME 变量和路径设置正确。 I added the below, which resolved this issue.我添加了以下内容,解决了这个问题。

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

Make sure, that the -vm option occurs before the -vmargs command.确保 -vm 选项出现在 -vmargs 命令之前。

The error message points to a problem with your java Version.该错误消息指出您的 Java 版本存在问题。 Do you have a JDK installed?你安装了JDK吗?

Try adding:尝试添加:

-vm 
c:/wherever/java/jdk1.8.0_40/jre/bin/server/jvm.dll

to your eclipse.ini file, pointing to the JDK you want to use, and check that the required Java Verision is at least as new as your JDK.到您的 eclipse.ini 文件,指向您要使用的 JDK,并检查所需的 Java 版本是否至少与您的 JDK 一样新。 This is the path for a Windows system.这是Windows系统的路径。

Discovered the issue thanks to @Goose.感谢@Goose 发现了这个问题。

My JDK version was somehow not working?我的 JDK 版本不知何故不起作用? A fresh installation of Java and JDK seemed to resolve the issue as well as the rerouting of the ini file to:全新安装的 Java 和 JDK 似乎解决了这个问题,并将 ini 文件重新路由到:

-vm c:/wherever/java/jdk1.8.0_40/jre/bin/server/jvm.dll -vm c:/wherever/java/jdk1.8.0_40/jre/bin/server/jvm.dll

我已经从系统环境变量中删除了在错误消息中显示的相同路径[在“路径”变量中]

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

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