Java class with compilation problem

I have met a similar problem as mentioned here,

I have a project that generate some java code and I will need these java class in another project. The generated code has some error because it need a dependant library, but Eclipse still generate the class file for them, even it has unresolved class reference. I actually noticed the error I still package them into a jar and import it the other project, because I thought the if I could import the dependant library in that project also, I’ll be safe. But I was wrong, the “Unresolved compilation problem” still occurred even I included the dependant library.

The solution is to include the dependant library into the original project that generate the code, make sure there is no error in the generated code and then included into the other project.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s