java - How do I fix a "declared package does not match the expected package" error on Eclipse? -


i've feel have gone through proper steps fix error, , i've looked @ other questions in , other places, reason i'm still having issue.

i trying set project using apache jmeter source code.

as example, file beanshellassertion.java in

~/workspace/apache-jmeter-2.9/src/components/org/apache/jmeter/assertions. 

my source folder src/components. package declaration in beanshellassertion.java is

package org.apache.jmeter.assertions; 

looking @ it, seems set way supposed be. however, package declaration causing error:

the declared package "org.apache.jmeter.assertions" not match expected package "components.org.apache.jmeter.assertions" 

image below. doing wrong here?

enter image description here

enter image description here

put src/components/ source path

right click > properties > java build path > source > add folder > select src/components


Comments