Question

I'm having a problem with imports in one of my java applications.

I've Taken a working JSP out of one Eclipse project, Jar'd up all the classes from that project and put it into a new project.

In the new Project I've imported the jar file generated from the original, and pasted the jsp code into a new JSP document.

I'm getting "The import XX could not be resolved errors".

Anyone one have any idea how to diagnose this, everything seems to be in order.

Was it helpful?

Solution

I have an issue like this once in awhile. Try removing the JAR, rebuilding, and adding the JAR again. This should fix it.

It's an Eclipse bug.

Edit: The above answer is assuming the jar is actually on the build path.

OTHER TIPS

When you say "I've imported the jar file" you mean you have copied it or put it in the classpath?

When you add a Jar file, instead of Import, right click on the project and choose "Add External Library" or "Add External Jar"

It sounds like the jar you imported doesn't appear in your build path. Try right-clicking the project, select Build Path > Add External Archives...

This should put a reference to your jar in the project build path.

Check inside the Jar (just open it from the build path) and see if the paths are correct. If you have foo.Bar as something else than foo/Bar.class that might be it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top