I am getting the following error when building a project in eclipse indigo:
An internal error occurred during: "Compacting resource model". Java heap.
Is this a memory problem?
Is it possible to compile a single package in eclipse (like similar to netbeans)? I had got a similar memory problem in netbeans but I got around it by compiling smaller number of packages at a time.
I had compiled the same project in ganemede without any problem.
UPDATE:
Stacktrace:
!ENTRY org.eclipse.core.jobs 4 2 2012-03-07 09:39:49.520
!MESSAGE An internal error occurred during: "Compacting resource model".
!STACK 0
java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.newKeyIterator(Unknown Source)
at java.util.HashMap$KeySet.iterator(Unknown Source)
at java.util.HashSet.iterator(Unknown Source)
at org.eclipse.core.internal.jobs.JobManager.findBlockingJob(JobManager.java:685)
at org.eclipse.core.internal.jobs.JobManager.doRunNow(JobManager.java:1085)
at org.eclipse.core.internal.jobs.JobManager.runNow(JobManager.java:1080)
at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:89)
at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:286)
at org.eclipse.core.internal.utils.StringPoolJob.run(StringPoolJob.java:101)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!ENTRY org.eclipse.core.jobs 4 2 2012-03-07 09:39:49.521
!MESSAGE An internal error occurred during: "Build Project".
!STACK 0
java.lang.OutOfMemoryError: Java heap space
at org.eclipse.wst.jsdt.core.compiler.CharOperation.concat(CharOperation.java:689)
at org.eclipse.wst.jsdt.core.infer.InferEngine.createAnonymousTypeName(InferEngine.java:682)
at org.eclipse.wst.jsdt.core.infer.InferEngine.createAnonymousType(InferEngine.java:658)
at org.eclipse.wst.jsdt.core.infer.InferEngine.visit(InferEngine.java:2072)
at org.eclipse.wst.jsdt.internal.compiler.DelegateASTVisitor.visit(DelegateASTVisitor.java:855)
at org.eclipse.wst.jsdt.internal.compiler.ast.ObjectLiteral.traverse(ObjectLiteral.java:66)
at org.eclipse.wst.jsdt.internal.compiler.ast.MessageSend.traverse(MessageSend.java:459)
at org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:174)
at org.eclipse.wst.jsdt.internal.compiler.ast.FunctionExpression.traverse(FunctionExpression.java:48)
at org.eclipse.wst.jsdt.internal.compiler.ast.ObjectLiteralField.traverse(ObjectLiteralField.java:63)
at org.eclipse.wst.jsdt.internal.compiler.ast.ObjectLiteral.traverse(ObjectLiteral.java:69)
at org.eclipse.wst.jsdt.internal.compiler.ast.ObjectLiteralField.traverse(ObjectLiteralField.java:63)
at org.eclipse.wst.jsdt.internal.compiler.ast.ObjectLiteral.traverse(ObjectLiteral.java:69)
at org.eclipse.wst.jsdt.internal.compiler.ast.MessageSend.traverse(MessageSend.java:459)
at org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:174)
at org.eclipse.wst.jsdt.internal.compiler.ast.FunctionExpression.traverse(FunctionExpression.java:48)
at org.eclipse.wst.jsdt.internal.compiler.ast.MessageSend.traverse(MessageSend.java:455)
at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:584)
at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:539)
at org.eclipse.wst.jsdt.core.infer.InferEngine.doInfer(InferEngine.java:1747)
at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.inferTypes(Parser.java:7093)
at org.eclipse.wst.jsdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:561)
at org.eclipse.wst.jsdt.internal.compiler.Compiler.beginToCompile(Compiler.java:328)
at org.eclipse.wst.jsdt.internal.compiler.Compiler.compile(Compiler.java:342)
at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:288)
at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:86)
at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:254)
at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:58)
at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:291)
at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:194)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
Open eclipse configuration(eclipse.ini) file folder from eclipse directory
-vmargs
-Xms128m
-Xmx512m
-XX:MaxPermSize=128m
place this code ...its work for me