[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

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.?

Thanks.
0
bobwood2000
Asked:
bobwood2000
1 Solution
 
objectsCommented:
assert is a new feature in 1.4, to avoid the warning add the following compile option:

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

http://www.cis.upenn.edu/~matuszek/cit594-2004/Pages/eclipse-faq.html
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now