---
title: "Eclipse错误：JVM is not suitable for this product"
author: "WKsandy"
date: "2010-08-28T22:28:46Z"
tags: []
categories: ["编程语言"]
slug: "eclipse-jvm-is-not-suitable-for-this-product"
draft: false
lastmod: "2010-08-28T22:28:46Z"
id: 749887
url: "https://wksandy.iteye.com/blog/749887"
---

问题：运行eclipse出现以下错误:Incompatible JVM 的对话框,内容如下:

    Version 1.3.1\_01 of the JVM is not suitable for this product.

    Version:1.4.1 or greater is required.

原因:

    因为机子里装了oracle，oracle自带1.31版JDK，由于eclipse目录中没有jre目录，同时在Path变量中找不到正确的javaw执行路径。没有找到 Java 运行期环境（JRE）。 所以eclipse无法启动。

解决方法：

    在环境变量中的PATH里装你装的JDK1.42的路径写到oracle路径前面，这样系统就不会先找oracle的jdk1.31了。

    也可以在eclipse的window -&gt; preferences -&gt; java -&gt; installed jres 新建一个，并把这个指定为默认的

 

另外的解决方法：

    1.在Ms-Dos窗口中，切换到eclipse目录，执行eclipse -vm dir-location 参数指定其他的JRE。

    2.复制需要的jre目录到eclipse目录中启动eclipse。

    3.设置系统环境变量，加上java的环境路径。

    以上3个方法可以分别执行，如果同时执行，默认情况下，Eclipse 首先执行 -vm 参数；如果没有-vm参数，则查找 eclipse\\jre 子目录；如果没有找到，Eclipse 将查找在系统中注册的 Java 运行期环境。