• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Being assertive with Eclipse

 
Manish Hatwalne
Ranch Hand
Posts: 2591
Android Firefox Browser Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have eclipse 3, and I use "assert" liberally in my Java code for development phase. However, though I have set compiler compliance for Java 1.4, eclipse still marks it as error, saying -
Syntax error on token "assert", assert expected

How can I configure Eclipse s that it recognizes assert correctly.

TIA,
- Manish
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the compiler options, "Compliance and Classfiles" tab, set all 3 options in the JDK compliance section to 1.4.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic