File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Being assertive with Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Being assertive with Eclipse" Watch "Being assertive with Eclipse" New topic

Being assertive with Eclipse

Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2591

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.

- Manish
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
in the compiler options, "Compliance and Classfiles" tab, set all 3 options in the JDK compliance section to 1.4.

subject: Being assertive with Eclipse
It's not a secret anymore!