There is a class file TagAttributeInfo
which is under two of my jar files.
j2ee-6.1.jar,servlet-api-2.3.jar .
Now i need that class to be called from j2ee-6.1.jar
but in runtime ,it is taking the class of servlet-api-2.3.jar
,which i don't want.
Can anybody help me to prioritize the jar file in class path so that i will give first priority to j2ee-6.1.jar
.
You move it up in the classpath order (right click on the project, select Build Path, followed by Configure Build Path and then Order and Export)
j2ee-6.1.jar
and press the Up button to move it higher up in the class path order. Keep pressing Up until it is above servlet-api-2.3.jar
.OK
.The first jar that it finds on the classpath that has the class it's looking for will be used. So you can prioritize your class by putting its jar at the beginning of the classpath.
How exactly you would do this in Eclipse I'm not sure, but there's probably some list of project dependencies that correspond to the jars on the classpath, and hopefully you can order the elements on that list and put your jar on the top. Try looking for it in the project settings panel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With