Programming Java 7 in Eclipse

前端 未结 5 1857
后悔当初
后悔当初 2020-12-15 02:29

I installed JDK 7 and Eclipse 3.6M6. Then, I added JRE 7 as a new JRE execution environment in Eclipse, and set the compiler compliance level to Java 7. I can compile the fo

5条回答
  •  鱼传尺愫
    2020-12-15 03:14

    I checkout the so called JSR 308 branch of org.eclipse.jdt.core using the following CVS repository information.

    Connection type: pserver
    User: anonymous
    Host: dev.eclipse.org
    Port: Default
    Repository path: /cvsroot/eclipse
    Module: org.eclipse.jdt.core
    Tag: JSR_308 (Branch)
    

    Then, I followed the instructions to install the checked out JDT in eclipse. Subsequently, I looked up org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeTypeAnnotationTest.java and /org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java to come up with small examples exercising JSR 308 type annotations.

    At this point, the branch supports and generates the corresponding new attributes in the .class files when annotations on types are present. But, annotation processors don't seem to work.

提交回复
热议问题