Exception occurred in [Javac] compiler (1.5.0_12)

Source: Internet
Author: User

When you compile your project with ant, you receive the following error:


An exception occurred in the [javac] Compiler (1.5.0_12). If the error is not found in the bug Parade, archive the error in Java Developer Connection (http://java.sun.com/webapps/bugreport). Please include your program and the following diagnostic information in the report. Thank you for your cooperation.
[Javac] Java.lang.OutofMemory: {unused}
[Javac] at Com.sun.tools.javac.tree.treemaker$annotationbuilder.visitarray (treemaker.java:634)
[Javac] at com.sun.tools.javac.code.attribute$array.accept (attribute.java:124)
[Javac] at Com.sun.tools.javac.tree.treemaker$annotationbuilder.translate (treemaker.java:637)
[Javac] at com.sun.tools.javac.tree.treemaker$annotationbuilder.visitcompoundinternal (treemaker.java:628)
[Javac] at Com.sun.tools.javac.tree.treemaker$annotationbuilder.translate (treemaker.java:641)
[Javac] at com.sun.tools.javac.tree.TreeMaker.Annotation (treemaker.java:649)
[Javac] at com.sun.tools.javac.tree.TreeMaker.Annotations (treemaker.java:570)
[Javac] at Com.sun.tools.javac.tree.TreeMaker.VarDef (treemaker.java:554)
[Javac] at Com.sun.tools.javac.comp.Lower.visitArrayForeachLoop (lower.java:2808)
[Javac] at Com.sun.tools.javac.comp.Lower.visitForeachLoop (lower.java:2757)
[Javac] at com.sun.tools.javac.tree.tree$foreachloop.accept (tree.java:597)
[Javac] at Com.sun.tools.javac.comp.Lower.translate (lower.java:1881)
[Javac] at Com.sun.tools.javac.tree.TreeTranslator.translate (treetranslator.java:54)
[Javac] at Com.sun.tools.javac.tree.TreeTranslator.visitBlock (treetranslator.java:145)
[Javac] at Com.sun.tools.javac.comp.Lower.visitBlock (lower.java:2927)
[Javac] at com.sun.tools.javac.tree.tree$block.accept (tree.java:535)
[Javac] at Com.sun.tools.javac.comp.Lower.translate (lower.java:1881)
[Javac] at Com.sun.tools.javac.tree.TreeTranslator.visitMethodDef (treetranslator.java:129)
[Javac] at com.sun.tools.javac.comp.Lower.visitMethodDefInternal (lower.java:2267)
[Javac] at Com.sun.tools.javac.comp.Lower.visitMethodDef (lower.java:2186)
[Javac] at com.sun.tools.javac.tree.tree$methoddef.accept (tree.java:478)
[Javac] at Com.sun.tools.javac.comp.Lower.translate (lower.java:1881)
[Javac] at Com.sun.tools.javac.comp.Lower.visitClassDef (lower.java:1989)
[Javac] at com.sun.tools.javac.tree.tree$classdef.accept (tree.java:434)
[Javac] at Com.sun.tools.javac.comp.Lower.translate (lower.java:1881)
[Javac] at Com.sun.tools.javac.comp.Lower.translate (lower.java:1901)
[Javac] at Com.sun.tools.javac.comp.Lower.translateTopLevelClass (lower.java:3064)
[Javac] at Com.sun.tools.javac.main.JavaCompiler.compile (javacompiler.java:487)
[Javac] at Com.sun.tools.javac.main.Main.compile (main.java:592)
[Javac] at Com.sun.tools.javac.main.Main.compile (main.java:544)
[Javac] at Com.sun.tools.javac.Main.compile (main.java:67)
[Javac] at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method)
[Javac] at Sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
[Javac] at Sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
[Javac] at Java.lang.reflect.Method.invoke (Unknown Source)
[Javac] at Org.apache.tools.ant.taskdefs.compilers.Javac13.execute (javac13.java:56)
[Javac] at Org.apache.tools.ant.taskdefs.Javac.compile (javac.java:997)
[Javac] at Org.apache.tools.ant.taskdefs.Javac.execute (javac.java:820)
[Javac] at Org.apache.tools.ant.UnknownElement.execute (unknownelement.java:288)
[Javac] at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method)
[Javac] at Sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
[Javac] at Sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
[Javac] at Java.lang.reflect.Method.invoke (Unknown Source)
[Javac] at Org.apache.tools.ant.dispatch.DispatchUtils.execute (dispatchutils.java:105)
[Javac] at Org.apache.tools.ant.Task.perform (task.java:348)
[Javac] at Org.apache.tools.ant.Target.execute (target.java:357)
[Javac] at Org.apache.tools.ant.Target.performTasks (target.java:385)
[Javac] at Org.apache.tools.ant.Project.executeSortedTargets (project.java:1329)
[Javac] at Org.apache.tools.ant.Project.executeTarget (project.java:1298)
[Javac] at Org.apache.tools.ant.helper.DefaultExecutor.executeTargets (defaultexecutor.java:41)
[Javac] at Org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets ( ECLIPSEDEFAULTEXECUTOR.JAVA:32)
[Javac] at Org.apache.tools.ant.Project.executeTargets (project.java:1181)
[Javac] at Org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run (internalantrunner.java:423)
[Javac] at Org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main (internalantrunner.java:137)

Looked up on the internet, only one post (http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=124&threadID=44481&tstart=30), said is because of the added @SuppressWarnings tags, but my project does not have this, JDK reload invalid, eclipse reload invalid, exhausted, and then made a previous version of the local backup test, incredibly can compile, dizzy dead.

Delete the current project, import the original item, then compiled, and then from CVS, the whole of the CVS are down, and this anomaly. Later, I saw the Ant in the compilation of a lot of Chinese code can not recognize the error, guess is not always fill the class of Chinese too much, day, think about hurriedly test, After removing the Chinese in several classes, the problem is no longer reproduced, Khan a!!!!!!!

   want friends with this kind of problem don't like me, toss for half a day incredibly is this problem, the whole system almost did not reload:/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.