This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Assert stmt in Eclipse

 
Lucky Singh
Ranch Hand
Posts: 125
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to use the assert stmt in eclipse.
assert dosomething();
The IDE does not seem to be recognizing this. How do I change my settings so that I can use this stmt?

Thanks.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to configure the complience level of the compiler in the Preferences.
 
Lucky Singh
Ranch Hand
Posts: 125
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And how do I do that?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which Eclipse version are you using? 3.1 has a nice filter field in the preference dialog which should make it very easy to find the settings. Do you know how to get to the preference dialog?
 
Lucky Singh
Ranch Hand
Posts: 125
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipse 3.1.
No, I don't know how to get to Preferences. When I first set up my project, I remember setting it to JDK 1.5 etc.
But I've forgotten how to do it. Can you please help me?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the "window" menu, select "preferences...". In the upcoming dialog, select java, compiler in the tree. There you should find the compliance level setting somewhere.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic