Ming
Ming

Reputation: 33

eclipse java 1.8 java.lang.outofmemoryerror: java heap space

Recently I try to migrate my java web application from java 1.7 to 1.8 using eclipse.

The Eclipse compile my project with java 1.7 is fine. But when I changed the library to java 1.8 to try to compile, the compile job is not stop and then after few hours it prompt error:

java.lang.outofmemoryerror: java heap space

I try to add the vm argument with command -Xms2048m -Xmx8192m, but it still fail. It seems not related to the memory problem but the java version problem. Does any one can help?

Below please find the details of the environment information:

Current project compiled successfull Java Verison: jdk1.7.0_97
Compfiled fail Java Version: jre1.8.0_151 
Eclipse version: Luna Release (4.4.0)

Upvotes: 1

Views: 1918

Answers (1)

Ming
Ming

Reputation: 33

I fixed the problem that I try to removed the related source that causing this problem and got another error message: java.lang.StackOverflowError at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.mentionsAny(ParameterizedTypeBinding.java:915)

Than I got the answer from below question: Eclipse Luna StackOverflow exception at Build Time

The problem is the eclipse Luna version 4.4.0 or below compiled with Java 1.8 may cause this problem. But the problem should be fixed in Luna 4.4.1.

I change to use oxygen 3 RC3(v4.7) and it is fine.

Upvotes: 1

Related Questions