关于java was start but returned exit code=13错误

起因

下载了JDK1.8,之后发现ECLPSE启动不起来了,报错

java was start but returned exit code=13

经查证,可能是因为64位和32位不匹配的问题

查看JDK版本

用java -version,未发现版本信息

java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) Client VM (build 25.25-b02, mixed mode, sharing)
只好打开记事本,写了段代码

public class A{
	public static void main(String[] args){
		
		String arch = System.getProperty("sun.arch.data.model");
		System.out.println(arch);
	}
}

运行

E:\>javac A.java
E:\>java A
错误: 找不到或无法加载主类 A

E:\>java -cp . A
32
可见JDK是32位的,而我的ECLIPSE是64的,所以不匹配,去下载最新的64位JDK

下载地址

eclipse :
http://www.eclipse.org/downloads/packages/release/Luna/R
jdk:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

你可能感兴趣的:(java,eclipse)