faulty build path?

I downloaded some open source code, and am attempting to compile it. I've openned it in Eclipse, and positioned the files such that such that none of the import statements generate errors. Therefore, I have some of the build path correct. However, "assert" statements still generate warnings, and would cause the program not to compile. For example, this line: assert true : "test string";

I think "assert" only has meaning when junit is imported. Is this correct? The software source code came with junit-3.8.1.jar, so I included that file in the build path. Still those warnings are generated.

Why isn't "assert" being recognized as a command in my program? What is it about the way I'm importing libraries/setting up classpath/including libraries/...etc.?

Who is Participating?
assert is a new feature in 1.4, to avoid the warning add the following compile option:

-source 1.4
bobwood2000Author Commented:
Problem solved! Here's how to make the changes to Eclipse:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.