Java jvm 1.4.2_03 版本不适合本产品。1.5 或更高版本是必需的问题

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

version 1.4.2_03 of the jvm is not suitable for this product. 1.5 or greater is required problem

javaeclipsejakarta-eejvm

提问by Adnan

Today i installed windows xp 2002 service pack2, eclipse was working fine on previous same window but now when i run eclipse it gives "version 1.4.2_03 is not suitable for this product.1.5 or greater is required"message and does not run. For checking my version of jvm, i visited java.com and clicked upon free java download button, it verified that i am having recommended java installed(1.6.0_27-ea) but eclipse is giving above mentioned message.Kindly tell me that what should i do?

今天我安装了 windows xp 2002 service pack2,eclipse 在以前的同一个窗口上运行良好,但现在当我运行 eclipse 时,它​​给出“版本 1.4.2_03 不适合这个产品。需要 1.5 或更高版本”消息并且无法运行。为了检查我的 jvm 版本,我访问了 java.com 并点击了免费的 java 下载按钮,它验证了我已经安装了推荐的 java(1.6.0_27-ea) 但 eclipse 给出了上述消息。请告诉我应该怎么做我愿意?

Thanks in advance

提前致谢

采纳答案by Adnan

Go to the directory where eclipse is installed and find a file called eclipse.ini. Open it and add the following lines

转到安装 eclipse 的目录,找到一个名为eclipse.ini. 打开它并添加以下几行

-vm
C:\Java\JDK\1.5\bin\javaw.exe

-vm
C:\Java\JDK\1.5\bin\javaw.exe

Make sure:

确保:

  1. You add that text before any -vmargsoption that may be in that file.
  2. The -vmis on its own line and the path to javaw.exeis on its own line.
  3. You specify the full path to your JDK 1.5's javaw.exe
  1. -vmargs在该文件中可能存在的任何选项之前添加该文本。
  2. -vm是在自己的行和路径javaw.exe的是自己的路线。
  3. 您指定 JDK 1.5 的javaw.exe的完整路径

回答by Vadim

  1. Try to uninstall previous Java version (if it is present)

  2. Find and replace with newer version the 'java.exe' binary, located somewhere on C:\Java\JDK\1.5\bin\javaw.exe

  1. 尝试卸载以前的 Java 版本(如果存在)

  2. 查找并替换为较新版本的“java.exe”二进制文件,位于 C:\Java\JDK\1.5\bin\javaw.exe 的某处

回答by Suraj Chandran

Do a echo %JAVA_HOME%. And make sure that it points to your new java version.

做一个echo %JAVA_HOME%。并确保它指向您的新 Java 版本。

回答by Rakesh Babu Bodapati

Follow below stepts that will resolve problem for sure.

按照以下步骤可以肯定地解决问题。

1) Install latest version of jdk

1)安装最新版本的jdk

2) Open eclipse.ini file in editplus (search for that file in eclipse folder)

2)在editplus中打开eclipse.ini文件(在eclipse文件夹中搜索该文件)

3) write first two lines like below with your java path and your java version

3)用你的java路径和你的java版本写下前两行

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

after writing that two lines your eclipse.ini files looks like this

-vm

C:\Program Files\Java\jdk1.6.0_12\bin\javaw.exe

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
.
.
.
.
.

回答by Ashok

below answer is suitable for springsuite

以下答案适用于 springsuite

-vm

-vm

C:\Program Files (x86)\Java\jdk1.6.0_12\bin\javaw.exe

C:\Program Files (x86)\Java\jdk1.6.0_12\bin\javaw.exe

in

springsuite also same

springsuite也一样

Go to installed STS.ini
For example

转到已安装的 STS.ini
例如

F:\springsource\sts-3.1.0.RELEASE\STS.ini open in editplus keep two lines before -vmargs as

F:\springsource\sts-3.1.0.RELEASE\STS.ini 在editplus中打开,保留-vmargs前两行为

-vm

-vm

C:\Program Files (x86)\Java\jdk1.6.0_12\bin\javaw.exe

C:\Program Files (x86)\Java\jdk1.6.0_12\bin\javaw.exe

it works sucessfully i had done it.

它工作成功我已经做到了。

回答by SamLe

My problem was the same, after having started Eclipse only once with Java 7 and then wanting to go back using Java 6.

我的问题是一样的,在使用 Java 7 只启动了一次 Eclipse 之后又想返回使用 Java 6。

Solution: In eclipse.iniI restored the value "1.6"for what was "-Dosgi.requiredJavaVersion=1.7".

解决方案:在eclipse.ini 中,我恢复了“ -Dosgi.requiredJavaVersion=1.7”的值“1.6”。

HTH!

哼!

回答by shady

I had same issue with java 1.5 when i installed 1.6. Removed 1.5 by deleting jdk and then installed 1.6 and set java_home which solved this issue.

我在安装 1.6 时遇到了与 java 1.5 相同的问题。通过删除 jdk 删除 1.5,然后安装 1.6 并设置 java_home 解决了这个问题。