My Java version is the newest version but my JVM i

2019-03-06 11:15发布

Recently I tried to use Eclipse but when I open it,it told me my JVM verion is too old

Incompatible JVM
Version 1.5.0_05 of the JVM is not suitable for this product.<br>
Version: 1.6 or greater is required

What make me feel strange is that' my java verion is the newest verion .

Also I have tried to install the last version from Oracle... jre,jdk or whatever, the same error come every time I start Eclipse

Please don't tell me to edit the data in "eclipse.ini" from turning 1.6 to 1.5 as I have ever tried it and get an error by saving a .class file.E

5条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-03-06 11:17

What does this site say?

http://www.java.com/en/download/uninstallapplet.jsp

You should probably look for version 1.7, not 1.6. (That's more current)

If you have an older version of Java, go here:

http://java.com/en/download/index.jsp

查看更多
放我归山
3楼-- · 2019-03-06 11:20

I doesn't know what did you do before, but you have to check :

The java version (according with your eclipse and its version). The JAVA_HOME path (jdk) in global environment variables. Try to change the runtimes environment in Eclipse.

查看更多
混吃等死
4楼-- · 2019-03-06 11:26

In your ~/.bashrc file add the following lines

export JAVA_HOME=/home/username/jdk1.7.0_11
export JDK_HOME=$JAVA_HOME
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib

in place of jdk1.7.0_11 put your JDK and see to it that the specified path is correct(wherever you have youe JDK).

查看更多
男人必须洒脱
5楼-- · 2019-03-06 11:27

This happen when you have another java version installed in your S.O. and the path to this version stay in "Environment Variables"."Path". So, remove any path that is pointing to another old version of java. In my case, i have oracle Forms6i installed in my S.O., and the installation program putted the path to the java 1.4. In my case the path was: C:\oracle\product\10.1.0\Client_1\jre\1.4.2\bin\client; C:\oracle\product\10.1.0\Client_1\jre\1.4.2\bin;

To access "Ambient Variables" no windows, right click mouse button on "My Computer" -> "Properties". On the left side click in "Advanced System Settings", on the top, click in the guide "Advanced", then click in the last button on the bottom, "Enviroment Variables". On the bottom have "System Variables", search for "Path" and do what i said there on top.

查看更多
叛逆
6楼-- · 2019-03-06 11:30

If this is happening when you click on the Eclipse icon, make sure that you have completely removed any previous Java installation. If you need to have Java 1.5, make sure that this installation is not referenced in the PATH environment variable.

If you can start eclipse, you can configure Eclipse projects to use the correct Java installation.

  1. Click Window->Prefences from the menu.
  2. Select Java-> Installed JREs
  3. Select Add
  4. Select Standard VM
  5. Set the directory to your 1.6 jdk directory.
查看更多
登录 后发表回答