facebook

Syntax error & source level 5.0

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #241999 Reply

    jdurrant
    Member

    Could someone help me this this please…

    I have some code generated by JAG 5.01, which I’m trying to use in a MyEclipse project.
    The following is in the source code for a DAO, which complies with Ant:

    @Entity
    @Table(name = “addresses”)

    There’s lots of other stuff about the database table in a Java code as well. But in MyEclipse, the code won’t compile – instead I get the message

    Syntax error, annotations are only available if source level is 5.0

    wherever this markup appears. Does anyone know what is causing this and how to fix it?

    Thanks.

    PS. I could just go through all the files in the DAO layer an remove the markup, but I don’t want to as I may need to re-generate the java code again.

    #242026 Reply

    Scott Anderson
    Participant

    You need to configure your workspace or project to compile using JDK 1.5 semantics rather than the default of 1.4. You can do that at Window > Preferences > Java > Compiler for the entire workspace or on a project by project bases by right clicking in the Package Explorer view and selecting Properites > Java Compiler

    #259474 Reply

    John
    Member

    I’m getting this same message, and I do have both workspace and project settings set for 5.0

    Edit: I’m doing work with aspects and I can work around it by avoiding annotations… nonetheless it would be preferable in my current project to use them.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Syntax error & source level 5.0

You must be logged in to post in the forum log in