| Author |
Assert stmt in Eclipse
|
Lucky Singh
Ranch Hand
Joined: Jan 19, 2004
Posts: 125
|
|
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
Joined: Jul 11, 2001
Posts: 14112
|
|
|
You need to configure the complience level of the compiler in the Preferences.
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
Lucky Singh
Ranch Hand
Joined: Jan 19, 2004
Posts: 125
|
|
|
And how do I do that?
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
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
Joined: Jan 19, 2004
Posts: 125
|
|
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
Joined: Jul 11, 2001
Posts: 14112
|
|
|
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.
|
 |
 |
|
|
subject: Assert stmt in Eclipse
|
|
|